This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Why does CYGWIN double the backslash in execvp()?


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

> 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
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]