www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/08/18/18:48:22

From: DavMac AT iname DOT com (Davin McCall)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: What's the difference between system, spawn and exec?
Date: Wed, 18 Aug 1999 15:49:58 GMT
Organization: Monash Uni
Lines: 23
Distribution: world
Message-ID: <37bad5a7.54874091@newsserver.cc.monash.edu.au>
References: <7pdhog$glp$1 AT server DOT noris DOT net>
NNTP-Posting-Host: damcc5.halls.monash.edu.au
X-Trace: towncrier.cc.monash.edu.au 934991338 5383 130.194.198.138 (18 Aug 1999 15:48:58 GMT)
X-Complaints-To: abuse AT monash DOT edu DOT au
NNTP-Posting-Date: 18 Aug 1999 15:48:58 GMT
X-Newsreader: Forte Free Agent 1.1/32.230
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

system() uses the shell (command processor) to process the command you
give it. So, you can use internal shell commands.

spawn() executes another process (program) and continues running your
program

exec() executes another process, after effectively terminating your
program.


Davin.

On Wed, 18 Aug 1999 21:43:09 GMT, ykgoh AT email DOT com (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()?

__________________________________________________________
       *** davmac - sharkin'!! davmac AT iname DOT com ***
my programming page: http://yoyo.cc.monash.edu.au/~davmac/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019