RE: Formatting command line arguments when starting a Cygwin process from a native process

2016-05-10 Thread David Allsopp
Aaron Digulla wrote: > David Allsopp wrote: > > Aaron Digulla wrote: > > > > > > Am Samstag, 07. Mai 2016 09:45 CEST, "David Allsopp" > > > schrieb: > > > > > > > > > > > Then all you need is a rudimentary quoting. > > > > > > > > Yes, but the question still remains what that rudimentary quoting >

RE: Formatting command line arguments when starting a Cygwin process from a native process

2016-05-10 Thread Aaron Digulla
Am Montag, 09. Mai 2016 17:19 CEST, David Allsopp schrieb: > Aaron Digulla wrote: > > > > Am Samstag, 07. Mai 2016 09:45 CEST, "David Allsopp" > > schrieb: > > > > > > > > Then all you need is a rudimentary quoting. > > > > > > Yes, but the question still

RE: Formatting command line arguments when starting a Cygwin process from a native process

2016-05-09 Thread David Allsopp
Marco Atzeri wrote: > On 09/05/2016 17:49, David Allsopp wrote: > > Marco Atzeri wrote: > >> > >> Ultimate overview of MS escape howto : > >> > >> https://blogs.msdn.microsoft.com/twistylittlepassagesallalike/2011/04 > >> /23/e veryone-quotes-command-line-arguments-the-wrong-way/ > > > > This is a

Re: Formatting command line arguments when starting a Cygwin process from a native process

2016-05-09 Thread Marco Atzeri
On 09/05/2016 17:49, David Allsopp wrote: Marco Atzeri wrote: Ultimate overview of MS escape howto : https://blogs.msdn.microsoft.com/twistylittlepassagesallalike/2011/04/23/e veryone-quotes-command-line-arguments-the-wrong-way/ This is a great article (which I'd not come across before),

RE: Formatting command line arguments when starting a Cygwin process from a native process

2016-05-09 Thread David Allsopp
Marco Atzeri wrote: > > Ultimate overview of MS escape howto : > > https://blogs.msdn.microsoft.com/twistylittlepassagesallalike/2011/04/23/e > veryone-quotes-command-line-arguments-the-wrong-way/ This is a great article (which I'd not come across before), but this relates to Microsoft's

RE: Formatting command line arguments when starting a Cygwin process from a native process

2016-05-09 Thread David Allsopp
Hi! Peter Rosin wrote: > I think cygwin emulates posix shell style command line parsing when > invoked from a Win32 process (like you do). So, try single quotes: > > commandLine = "callee.exe \"@\"te\"\n\"st fo@o bar\" \"baz baz '*' > '\"\\'\"'"; > > I get this (w/o noglob): > > argc = 7 >

RE: Formatting command line arguments when starting a Cygwin process from a native process

2016-05-09 Thread David Allsopp
Aaron Digulla wrote: > > Am Samstag, 07. Mai 2016 09:45 CEST, "David Allsopp" > schrieb: > > > > > Then all you need is a rudimentary quoting. > > > > Yes, but the question still remains what that rudimentary quoting is - > i.e. > > I can see how to quote spaces which appear

RE: Formatting command line arguments when starting a Cygwin process from a native process

2016-05-09 Thread Aaron Digulla
Am Samstag, 07. Mai 2016 09:45 CEST, "David Allsopp" schrieb: > > Then all you need is a rudimentary quoting. > > Yes, but the question still remains what that rudimentary quoting is - i.e. > I can see how to quote spaces which appear in elements of argv, but I cannot > see

Re: Formatting command line arguments when starting a Cygwin process from a native process

2016-05-09 Thread Marco Atzeri
On 09/05/2016 11:43, Peter Rosin wrote: Hi! I'm not using cmd, or any shell for that matter (that's actually the point) - I am in a native Win32 process invoking a Cygwin process directly using the Windows API's CreateProcess call. As it happens, the program I have already has the arguments

Re: Formatting command line arguments when starting a Cygwin process from a native process

2016-05-09 Thread Peter Rosin
Hi! On 2016-05-07 09:45, David Allsopp wrote: > Andrey Repin wrote: >> Greetings, David Allsopp! > > And greetings to you, too! > > > >>> I'm not using cmd, or any shell for that matter (that's actually the >>> point) - I am in a native Win32 process invoking a Cygwin process >>> directly

RE: Formatting command line arguments when starting a Cygwin process from a native process

2016-05-07 Thread David Allsopp
Andrey Repin wrote: > Greetings, David Allsopp! And greetings to you, too! > > I'm not using cmd, or any shell for that matter (that's actually the > > point) - I am in a native Win32 process invoking a Cygwin process > > directly using the Windows API's CreateProcess call. As it happens, >

Re: Formatting command line arguments when starting a Cygwin process from a native process

2016-05-06 Thread Andrey Repin
Greetings, David Allsopp! > [With apologies if threading is broken; I erroneously thought as the list > was not subscriber-only that replies would use reply-all and so wasn't > subscribed] As long as your mail client is fine, you're fine. > I'm not using cmd, or any shell for that matter

Re: Formatting command line arguments when starting a Cygwin process from a native process

2016-05-06 Thread Erik Soderquist
On Fri, May 6, 2016 at 4:03 AM, David Allsopp wrote: > > [With apologies if threading is broken; I erroneously thought as > the list was not subscriber-only that replies would use reply-all > and so wasn't subscribed] Didn't break for me, though that might be google's threading in gmail rather

RE: Formatting command line arguments when starting a Cygwin process from a native process

2016-05-06 Thread David Allsopp
[With apologies if threading is broken; I erroneously thought as the list was not subscriber-only that replies would use reply-all and so wasn't subscribed] On Thu, May 5, 2016 at 06:47 PM, Erik Soderquist wrote: > On Thu, May 5, 2016 at 11:24 AM, David Allsopp wrote: > > > > I am trying to work

Re: Formatting command line arguments when starting a Cygwin process from a native process

2016-05-05 Thread Erik Soderquist
On Thu, May 5, 2016 at 11:24 AM, David Allsopp wrote: > > I am trying to work out the precise details for character escaping when > starting a Cygwin process from a native (i.e. non-Cygwin) Windows process. > For example: > > argv[0] = "foo" > argv[1] = "bar baz" > > then the resulting