This is the mail archive of the
mailing list for the Cygwin project.
Re: freopen/fread/popen bug
- From: A L <al20878 at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Fri, 27 Feb 2015 14:04:59 -0500
- Subject: Re: freopen/fread/popen bug
- Authentication-results: sourceware.org; auth=none
- References: <CAKVG1_qobJxAZSeZDozsGb7pb3ugYk_AgmEJXU-wRt+ifhf-QA at mail dot gmail dot com>
> Thanks (and thanks to Corinna and Eric) for correcting my misconceptions.
You're welcome. I only wanted to follow up that (I don't know what
the heck happened to my head, but) when I was
referring to file descriptors, I was consistently and mistakenly using
"1" where "0" should have been used:
stdin is at "0", and stdout is at "1" (and your code shares input
stream with "cat", i.e. fd 0). Apologies.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple