allow executing a path in backslash notation

Ilguiz Latypov ilatypov@infradead.org
Fri Mar 12 04:44:00 GMT 2010


On Mar 10 10:25, Corinna Vinschen wrote:
> execv (argv[1], args);

> bash$ gcc -o exec exec.c
> bash$ ./exec /bin/echo
> abc
> bash$ ./exec C:\\cygwin\\bin\\echo
> abc
Thanks for trying a test case. I am attaching a new test case that 
shows that the trouble was with execvp(), not exec(). Only execvp() 
calls find_exec() which fails to find a file in backslash notation,
 find_exec (path, buf, "PATH=", FE_NNF)
Another call to find_exec in spawnvpe() seems to succeed,
 find_exec (file, buf)
So, perhaps, another way to address the issue is to call find_exec()
without the 2 extra parameters. I find it confusing that the 
function did not work despite its numerous options and its usage of 
isdrive() implying attempts to handle Windows native paths.
-- 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: exec.c
URL: <http://cygwin.com/pipermail/cygwin/attachments/20100312/7fce3005/attachment.c>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: exec-test-case2.txt
URL: <http://cygwin.com/pipermail/cygwin/attachments/20100312/7fce3005/attachment.txt>
-------------- next part --------------
--
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

AltStyle によって変換されたページ (->オリジナル) /