This is the mail archive of the
cygwin
mailing list for the Cygwin project.
execlp/execvp needs case-correct PATH
- From: Thomas Wolff <towo at towo dot net>
- To: cygwin at cygwin dot com
- Date: Mon, 09 Feb 2015 00:04:46 +0100
- Subject: execlp/execvp needs case-correct PATH
- Authentication-results: sourceware.org; auth=none
With a Windows case sensitive file system (and according mount flags
for /cygdrive), the PATH does not properly reflect casing of the actual
directories (e.g. C:\WINDOWS vs. C:\Windows, thanks MS...).
However, the shell finds programs anyway, like e.g. notepad.
The exec*p system calls, on the other hand, do not find a program in this
case as demonstrated by the attached test program.
This is in contrast to the Linux (and POSIX?) manual page which claims
âThe execlp(), execvp(), and execvpe() functions duplicate the actions
of the shell in searching for an executable file ââ
Thomas
--
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