home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.internals
- Path: sparky!uunet!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbnewsc!cbfsb!att-out!pacbell.com!tandem!hood!bill
- From: norcott_bill@tandem.com (Bill Norcott)
- Subject: Re: How can a Unix process put itself in background?
- Message-ID: <1992Sep11.222546.3878@tandem.com>
- Sender: news@tandem.com
- Nntp-Posting-Host: hood.tsg.tandem.com
- Reply-To: norcott_bill@tandem.com (Bill Norcott)
- Organization: Tandem Computers, Inc.
- References: <lma.716056953@dayton.Stanford.EDU> <1992Sep11.170405.28836@tandem.com> <18qopsINN12n@early-bird.think.com>
- Date: Fri, 11 Sep 1992 22:25:46 GMT
- Lines: 23
-
- In article <18qopsINN12n@early-bird.think.com>, barmar@think.com (Barry Margolin) writes:
- |> In article <1992Sep11.170405.28836@tandem.com> norcott_bill@tandem.com (Bill Norcott) writes:
- |> >If you have a POSIX 1003.1 conforming system, a process can put
- |> >itself into the background with the setpgid() system call.
- |>
- |> You still have to fork first, as the shell (or whatever process started the
- |> program) waits for the original process to exit.
-
- Sure, all UNIX user processes are created by fork(). So the process
- that wants to put itself into the background was created by fork().
- And it's parent should be using waidpid() or wait() to wait for the
- death of the child. But the original question was, how can the guy's
- existing (child) process put ITSELF in the background. This is where
- setsid() and setpgid() are used.
-
- --
- ---------------------------------------------------------------------|
- Bill Norcott GUARDIAN POSIX project
- Tandem Computers, Inc.
- 10600 N. Tantau Avenue PHONE: (408) 285-3253
- Cupertino, CA 95014 EMAIL: norcott_bill@tandem.com
-
-
-