Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!magnus.ircc.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!ucdavis!csusac!usenet From: emmonsl@athena.ecs.csus.edu (L. Scott Emmons) Newsgroups: comp.unix.programmer Subject: Re: system() question Message-ID: <1991Mar3.175234.11716@csusac.csus.edu> Date: 3 Mar 91 17:52:34 GMT References: <9321@hub.ucsb.edu> <1991Mar2.181423.13981@csusac.csus.edu> Sender: usenet@csusac.csus.edu (News account (alt)) Distribution: comp Organization: California State University, Sacramento Lines: 17 In article <1991Mar2.181423.13981@csusac.csus.edu> I wrote: >Also, you are _much_ better off doing a fork() and then an exec() >instead of a system()...system just does the equivalent of a fork() [...] Ack, I made a bit of an error in this post. You will also need to set up a pipe() to properly handle the redirection. I assume you were going to take the file then and read it back into the program? If so, a pipe() works well for this. Sorry for the mistake... L. Scott Emmons --------------- emmons@csus.csus.edu ...[ucbvax]!ucdavis!csus!emmons Packet: kc6nfp@kg6xx.#nocal.ca.usa.na