Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!hacgate!ashtate!dbase!brucem From: brucem@dbase.A-T.COM (Bruce Madsen) Newsgroups: comp.lang.c Subject: Re: Redirecting STDOUT using spawn Message-ID: <440@dbase.A-T.COM> Date: 24 Feb 90 18:50:26 GMT References: <14466.25E403FD@urchin.fidonet.org> Reply-To: brucem@dbase.UUCP (Bruce Madsen) Organization: Ashton Tate Development Center Glendale, Calif. Lines: 19 >In an article of <19 Feb 90 20:42:36 GMT>, (owen adair) writes: > > >How do I redirect stdout for a child process using spawn instead of > >system? /* stuff deleted regarding spawn and stdio redirection. */ If you want to use the rawio operators (i.e. open read write), look at the man page for dup and dup2 in the microsoft C runtime library manual. They give an example on redirection. To redirect stdout, use 1 in for the file handle. Bruce Madsen -- * Hockey - The world's fastest sport* The proceeding has not been brought to * * Baseball - Sominex for the masses * you by Ashton-Tate. The above opinions * * Bo don't know database * are mine. * * B. G. Madsen - Ashton-Tate Glendale Development Center. brucem@dbase------*