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/

