home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ferkel.ucsb.edu!taco!rock!stanford.edu!agate!ames!saimiri.primate.wisc.edu!zaphod.mps.ohio-state.edu!uwm.edu!ogicse!das-news.harvard.edu!husc-news.harvard.edu!husc-news!huang1
- From: huang1@husc10.harvard.edu (Howard Huang)
- Newsgroups: comp.unix.programmer
- Subject: Re: Creating a background process from within C prog
- Message-ID: <HUANG1.92Nov10171831@husc10.harvard.edu>
- Date: 11 Nov 92 01:18:31 GMT
- Article-I.D.: husc10.HUANG1.92Nov10171831
- References: <1992Oct27.103059.60148@cc.usu.edu> <BwsyCt.9Gx@acsu.buffalo.edu>
- Organization: Harvard Arts and Sciences Computer Services, Cambridge, MA
- Lines: 14
- Nntp-Posting-Host: husc10.harvard.edu
- In-reply-to: jcmurphy@acsu.buffalo.edu's message of 27 Oct 92 22:55:41 GMT
-
- jcmurphy@acsu.buffalo.edu (Jeff Murphy) writes:
-
- kiddo = fork();
-
- if (kiddo == 0)
- {
- system("ls > /tmp/myfile");
- exit(0);
- }
- printf("world\n");
-
- In a real application be sure you check the return value of fork for
- errors. For example, fork will fail if the user has reached his/her
- process limit.
-