This is the mail archive of the
mailing list for the Cygwin project.
Re: Why does CYGWIN double the backslash in execvp()?
- From: A L <al20878 at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Fri, 27 Feb 2015 00:03:12 -0500
- Subject: Re: Why does CYGWIN double the backslash in execvp()?
- Authentication-results: sourceware.org; auth=none
Thank you for your response. It may sound plausible but:
> you tell Cygwin that you want posix semantics
I can't remember seeing that posix semantics require a C library call
to modify arguments in the way the shell does; since when cygwin a
> split arg 2 into two args: "DIR" and "C:\\"
and why does it make a difference, all of a sudden? (posix rules no
longer apply to more than 2 arguments?) also, if "\\" is followed by
an additional space, "DIR C:\\ ", then it begins to work as well.
> Cygwin cannot make exceptions for individual applications
right! because cygwin does already know a lot about cmd.exe and
command.com and treats them very specially in case of a "/c" switch
followed by exactly one argument! take a look at spawn.cc.
btw, on linux, strace for execl() shows no substitution of a lone
backslash passed in an argument... not posix complying, too?
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple