public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Stephen Provine via cygwin" <cygwin@cygwin.com>
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: RE: Command line processing in dcrt0.cc does not match Microsoft parsing rules
Date: Fri, 06 Sep 2019 06:20:00 -0000	[thread overview]
Message-ID: <MWHPR21MB0845F7CD75F749D79705F0D8B9BA0@MWHPR21MB0845.namprd21.prod.outlook.com> (raw)
In-Reply-To: <MWHPR21MB0845845AC5AD54E3A2EAA05EB9BB0@MWHPR21MB0845.namprd21.prod.outlook.com>

On 9/5/19 9:26 PM, Eric Blake wrote:
> Rather, go is not passing the command line to CreateProcess in the way
> that is unambiguously parseable in the manner expected by
> CommandLineToArgvW.

The specific example I gave is unambiguous and is parsed correctly by
CommandLineToArgvW, so if the goal is for Cygwin to effectively
simulate this function, I can confirm that it is missing this case.

It's reasonable that Go's algorithm should be changed to have a better
chance of working with Windows programs that manually implement
command line parsing and may not match expectations for all cases.
I'll follow up with them and for the time being, work around the issue
with my own implementation as I've since figured out how to do that.

FWIW, here's the most definitive reference I've found for how Windows
binaries compiled with the Microsoft C/C++ compilers do command line
parsing, in case there is any desire to address this issue at some point:

http://daviddeley.com/autohotkey/parameters/parameters.htm#WINCRULES

Thanks for entertaining my persistence on this topic!

Stephen


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

  parent reply	other threads:[~2019-09-06  6:20 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-30 19:31 Stephen Provine via cygwin
2019-08-30 20:53 ` Brian Inglis
2019-08-30 21:21 ` Stephen Provine via cygwin
2019-08-31  4:18   ` Brian Inglis
2019-09-03 16:38   ` Stephen Provine via cygwin
2019-09-04 16:20     ` Brian Inglis
2019-09-04 23:46     ` Stephen Provine via cygwin
2019-09-05  5:29       ` Brian Inglis
2019-09-05 18:31       ` Stephen Provine via cygwin
2019-09-05 19:05         ` Eric Blake
2019-09-05 22:01         ` Stephen Provine via cygwin
2019-09-05 22:46           ` Eric Blake
2019-09-05 23:45           ` Stephen Provine via cygwin
2019-09-06  0:46             ` Steven Penny
2019-09-06  1:26             ` Eric Blake
2019-09-06  6:20             ` Stephen Provine via cygwin [this message]
2019-09-07 21:50           ` Brian Inglis
2019-09-07 12:05         ` Andrey Repin
2019-09-07 12:20           ` Andrey Repin
2019-09-09 16:47           ` Stephen Provine via cygwin
2019-09-09 16:57             ` Stephen Provine via cygwin
2019-09-09 17:11               ` Eric Blake
2019-09-09 19:05                 ` Duncan Roe
2019-09-09 19:44                   ` Andrey Repin
2019-09-10 12:43                   ` Brian Inglis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MWHPR21MB0845F7CD75F749D79705F0D8B9BA0@MWHPR21MB0845.namprd21.prod.outlook.com \
    --to=cygwin@cygwin.com \
    --cc=stephpr@microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).