This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: [ANNOUNCEMENT] Updated: cygwin-1.5.19-1
> * Brian Ford <Oevna.Sbeq@syvtugfnsrgl.pbz> [2006-01-18 14:06:19 -0600]:
>
> On Wed, 18 Jan 2006, Sam Steingold wrote:
>
>> here is a simple test case:
>>
>> int main (int argc, char *argv[]) {
>> char executable[MAXPATHLEN];
>> realpath(argv[0],executable);
>> if (open(executable,O_RDONLY|O_BINARY,0644) < 0) return 1;
>> else return 0;
>> }
>>
>> it worked (returned 0) before and it works on Linux.
>> it does not work now.
>
> Looks very similar to:
>
> http://www.cygwin.com/ml/cygwin/2004-09/msg00867.html
not only cygwin "drops extension" from argv[0] (as your bug report
says), it also fails to restore it in realpath().
the point here is that the return value of realpath() cannot fail to
open due to ENOENT - as it does on cygwin.
--
Sam Steingold (http://www.podval.org/~sds) running w2k
http://www.openvotingconsortium.org http://www.mideasttruth.com
http://www.camera.org http://ffii.org http://truepeace.org
Winners never quit; quitters never win; idiots neither win nor quit.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/