Command line processing in dcrt0.cc does not match Microsoft parsing rules

Brian Inglis Brian.Inglis@SystematicSw.ab.ca
Sat Sep 7 21:50:00 GMT 2019


On 2019-09-05 16:01, Stephen Provine via cygwin wrote:
> On 9/5/19 2:05 PM, Eric Blake wrote:
>> On 9/5/19 1:31 PM, Stephen Provine via cygwin wrote:
>>> Not expected.
> 
>> Why not? That obeyed cmd's odd rules: The moment you have a " in the
>> command line, that argument continues until end of line or the next "
>> (regardless of how many \ precede the ").
> 
> Now I'm really confused. Brian seemed to indicate that the POSIX rules were
> followed, but you're indicating that the Windows command line parsing rules
> are followed. So I assume the reality is that it is actually some mix of the two.
> Is the effective parsing logic implemented by Cygwin documented anywhere?

Depends on what you are running thru - you have layers - in that test case you
ran from cmd, so cmd parsing has to be first taken into account, before passing
the resulting command line to bash, where Cygwin will construct a POSIX argument
list from cmd output, and pass that to bash then script.sh.

Try your testing using my script.sh shown earlier, and call bash with -vx
options for debugging output.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.

--
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



More information about the Cygwin mailing list