home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.programmer
- Path: sparky!uunet!caen!batcomputer!theory.TC.Cornell.EDU!mdw
- From: mdw@theory.TC.Cornell.EDU (Matt Welsh)
- Subject: Re: Creating a background process from within C prog
- Message-ID: <1992Nov12.060621.2342@tc.cornell.edu>
- Sender: news@tc.cornell.edu
- Nntp-Posting-Host: theory.tc.cornell.edu
- Organization: Cornell Theory Center
- References: <1992Nov11.032950.23086@leland.Stanford.EDU> <1992Nov12.003035.24322@tc.cornell.edu> <1992Nov12.020913.19659@leland.Stanford.EDU>
- Date: Thu, 12 Nov 1992 06:06:21 GMT
- Lines: 17
-
- In article <1992Nov12.020913.19659@leland.Stanford.EDU> dkeisen@leland.Stanford.EDU (Dave Eisen) writes:
- >
- >No no no.... Do the system in the parent. My point is that
- >if you are going to do a "system", there is no reason to
- >fork in the parent. The system statement above runs ls
- >in the background without having to do any explicit forks.
-
- Aha. Right you are, system() can handle the spawning quite nicely for you. :)
- I thought you were referring to just replacing the system() inside of the
- fork with the backgrounded one.
-
- However I don't trust system(), something about running a shell for one
- command bothers me, or maybe it's just that I like to know exactly what I'm
- doing (picky parents pick execv(), or something like that).
-
- mdw
-
-