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: allow executing a path in backslash notation



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.

-- 

Attachment: exec.c
Description: Text document

Attachment: exec-test-case2.txt
Description: Text document

--
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]