system() question

L. Scott Emmons emmonsl at athena.ecs.csus.edu
Mon Mar 4 03:52:34 AEST 1991


In article <1991Mar2.181423.13981 at 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 at csus.csus.edu  <or>  ...[ucbvax]!ucdavis!csus!emmons
		Packet: kc6nfp at kg6xx.#nocal.ca.usa.na



More information about the Comp.unix.programmer mailing list