This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: cygwin 1.7 fstat weirdness
On Mon, Apr 6, 2009 at 4:11 PM, Corinna Vinschen wrote:
> On Apr Â6 14:46, Gregg Reynolds wrote:
>> Â int fd = path ? open(path, O_RDONLY, TCFILEMODE) : 0; Â// path = "Makefile"
>
> Is fd == 0 by any chance? ÂThe above code silently sets fd to 0 if it
> can't open path.
Unless I'm missing something, that code sets fd to 0 if path is
NULL... which doesn't seem to make any sense at all, since 0 is a
valid file descriptor number...
~Matt
--
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/