redirecting standard i/o from an exec'ed programme

George Bogatko bogatko at lzga.ATT.COM
Thu Aug 23 22:40:22 AEST 1990


In article <3939 at auspex.auspex.com>, guy at auspex.auspex.com (Guy Harris) writes:
> >Popen is expensive.  It requires a shell for 'system' and then
> >another shell to run your request in.
> 
> It doesn't use "system()" on any UNIX implementation I've used (V7, BSD,
> S3, S5, etc.).  It just runs *one* shell, which runs your command. 

Absolutly right.  I goofed.  What we saw was an explosion of 'exec' calls
when people used popen instead of directly calling 'fork' and 'exec'.

One exec for the shell, and another exec for the program, if it didn't
involve a pipeline.

Sorry,

GB



More information about the Comp.unix.questions mailing list