Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.unix.questions Subject: Re: shell in programs Message-ID: <5302@auspex.auspex.com> Date: 16 Jan 91 19:55:42 GMT References: <346@bria> <5236@auspex.auspex.com> <371@ddmt.dla.mil> Distribution: na Organization: Auspex Systems, Santa Clara Lines: 9 >Another advantage to *not* using system() is > "There is an enormous amount of overhead associated with each system > call. The starting program has to fork and exec the shell, and then > the shell has to fork and exec the requested program..." [1] Yes, but if the person wants to run an arbitrary shell command - and that's what it sounded like the original poster wanted to do - you have to run the shell anyway (or precisely duplicate its actions, which seems like a waste).