home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / internal / 1783 < prev    next >
Encoding:
Internet Message Format  |  1992-09-09  |  1.2 KB

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