[PATCH] Fix for backslash quoting in argument list passing (spawn_guts)
Pierre Bogossian
bogus@bsdshell.net
Mon Nov 20 12:05:00 GMT 2000
>I've included what I think is a much simpler patch below. It seems to
>work correctly using a vc compiled program which echos its args.
The problem with your patch is that it can double backslashes even if
they don't precede a '"', and that shouldn't be done !
Here is what I get with your patch:
/tmp $ ./print_args_cygwin.exe 'a a\\a'
1: a a\\a
/tmp $ ./print_args_nocygwin.exe 'a a\\a'
1: a a\\\\a
Another issue is that backslashes that are just before the closing '"'
have to be doubled too:
/tmp $ ./print_args_cygwin.exe 'a a\'
1: a a\
/tmp $ ./print_args_nocygwin.exe 'a a\'
1: a a"
My print_args_nocygwin.exe is compiled with gcc, but I guess the
result is the same with vc.
Pierre Bogossian
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
More information about the Cygwin
mailing list