home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!news.funet.fi!hydra!klaava!klaava!hurtta
- From: hurtta@cs.Helsinki.FI (Kari E. Hurtta)
- Newsgroups: comp.unix.internals
- Subject: Re: How can a Unix process put itself in background?
- Message-ID: <HURTTA.92Sep9202811@plootu.Helsinki.FI>
- Date: 9 Sep 92 18:28:11 GMT
- References: <lma.716056953@dayton.Stanford.EDU>
- Sender: news@klaava.Helsinki.FI (Uutis Ankka)
- Organization: Department of Computer Science, University of Helsinki, Finland
- Lines: 15
- In-Reply-To: lma@dayton.Stanford.EDU's message of 9 Sep 92 16: 42:33 GMT
-
- In article <lma.716056953@dayton.Stanford.EDU> lma@dayton.Stanford.EDU (Larry Augustin) wrote:
- > In effect, the program wants to "detach"
- > itself from stdin/stdout, return control to the shell, and continue in
- > background for a while before exiting.
- >
- > The only solutions we could come up with were based on forking a child
- > to do the background part. is this the only way to do it? Is there a
- > solution that does not need a fork?
-
- No, there isn't without help of shell. And there isn't such shell.
- Returning control to the shell is hard part. Control returns to shell,
- when process exits or change state from running to stopped (ie. when
- wait4 -system call returns in shell).
-
- - K E H
-