Redirecting STDOUT using spawn

Bruce Madsen brucem at dbase.A-T.COM
Sun Feb 25 05:50:26 AEST 1990


>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 at dbase------*



More information about the Comp.lang.c mailing list