home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / internal / 1800 < prev    next >
Encoding:
Text File  |  1992-09-11  |  1.9 KB  |  41 lines

  1. Newsgroups: comp.unix.internals
  2. Path: sparky!uunet!cs.utexas.edu!usc!sdd.hp.com!caen!hellgate.utah.edu!fcom.cc.utah.edu!cs.weber.edu!terry
  3. From: terry@cs.weber.edu (A Wizard of Earth C)
  4. Subject: Re: How can a Unix process put itself in background?
  5. Message-ID: <1992Sep12.020457.5127@fcom.cc.utah.edu>
  6. Sender: news@fcom.cc.utah.edu
  7. Organization: Weber State University  (Ogden, UT)
  8. References: <1992Sep11.170405.28836@tandem.com> <18qopsINN12n@early-bird.think.com> <1992Sep11.222546.3878@tandem.com>
  9. Date: Sat, 12 Sep 92 02:04:57 GMT
  10. Lines: 29
  11.  
  12. In article <1992Sep11.222546.3878@tandem.com> norcott_bill@tandem.com  (Bill Norcott) writes:
  13. >Sure, all UNIX user processes are created by fork().  So the process
  14. >that wants to put itself into the background was created by fork().
  15. >And it's parent should be using waidpid() or wait() to wait for the
  16. >death of the child.  But the original question was, how can the guy's
  17. >existing (child) process put ITSELF in the background.  This is where
  18. >setsid() and setpgid() are used.
  19.  
  20.     Say!  That's right!  He never said he actually wanted the shell that
  21. launched the program to return -- he just wanted the child in the background
  22. instead of the foreground!  8-).  8-).
  23.  
  24.     Seriously, I think he wanted the parent (the shell) to keep running
  25. as if the process had completed, but leaving the process in the background.
  26. This is what everything he has posted so far has implied, although not as
  27. tersely.
  28.  
  29.  
  30.                     Terry Lambert
  31.                     terry_lambert@gateway.novell.com
  32.                     terry@icarus.weber.edu
  33. ---
  34. Any opinions in this posting are my own and not those of my present
  35. or previous employers.
  36. -- 
  37. -------------------------------------------------------------------------------
  38.                                         "I have an 8 user poetic license" - me
  39.  Get the 386bsd FAQ from agate.berkeley.edu:/pub/386BSD/386bsd-0.1/unofficial
  40. -------------------------------------------------------------------------------
  41.