Sender: nate AT cartsys DOT com Message-ID: <37BDC97F.609A7CB3@cartsys.com> Date: Fri, 20 Aug 1999 14:32:47 -0700 From: Nate Eldredge X-Mailer: Mozilla 4.08 [en] (X11; I; Linux 2.2.12pre4 i586) MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: What's the difference between system, spawn and exec? References: <7pdhog$glp$1 AT server DOT noris DOT net> <37BAD5AE DOT A01B904F AT americasm01 DOT nt DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com Campbell, Rolf [SKY:1U32:EXCH] wrote: > > Goh Yong Kwang wrote: > > > The functions, system(), spawn() and exec() are used to execute other programs > > or commands. So what's the difference between them? > > > > When should I use system(), spawn() and exec()? > > You should only use 'exec' when you are writing a program for UNIX, and it is > only in DJGPP for the purpose of compatability. And even so is not very useful without `fork', which DJGPP doesn't have at all. `system' is much more portable, so use it whenever practical. -- Nate Eldredge nate AT cartsys DOT com