[Top] [All Lists]

system() function

To: "Linux-Mips (E-mail)" <>
Subject: system() function
From: "Siders, Keith" <>
Date: Thu, 30 May 2002 11:01:30 -0500
I was planning to use system() to invoke a shell and launch a script.
However it appears that this causes the parent process to terminate. A note
in Linux Programming Bible (Goerzen, 2000) says to never invoke a shell or
use the system() function. Having looked at fork() and exec(), these will
require obscene amounts of memory and overhead (for an embedded box). I've
also looked at vfork() and execve(), which looks like it will do what I
want. So do I do the vfork()/execve() pair, or is there a better way? And
would sigaction() handling be the way to pass progress information from the
child back to the parent process?

Keith Siders
Software Engineer
 Toshiba America Consumer Products, Inc.
Advanced Television Technology Center
801 Royal Parkway, Suite 100
Nashville, Tennessee 37214
Phone: (615) 257-4050
Fax:   (615) 453-7880

<Prev in Thread] Current Thread [Next in Thread>