This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
opening stdin, stdout & stderr as pipes
- To: gnu-win32 at cygnus dot com
- Subject: opening stdin, stdout & stderr as pipes
- From: "Simon Weatherill" <simon at ptgi dot com>
- Date: 29 Sep 1998 21:05:30 -0000
- Cc: simon at ptgi dot com
I'm trying to read output from a pipe, but since I also need to be able to read stderr separately, I can't use popen(). Instead, I have fork()'d and execl()'d after closing the 3 standard files and dup'ing pipes to them.
This works fine under UNIX (I've tried 5 different ones), but the output from the commands I'm exec'ing is disappearing. Even if I leave stdout alone and swap stdin, I *still* lose stdout! Does anyone know what's going on?
I've searched the archives here, but haven't found anything except an example of a piped command using Windows' _pipe() and _spawnlp() functions (posted on 6/11/98). I'd rather use the sequence that works under UNIX, but I'll try anything.
Thanks,
Simon Weatherill
-----
Free e-mail group hosting at http://www.eGroups.com/
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".