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

  1. Newsgroups: comp.unix.internals
  2. Path: sparky!uunet!stanford.edu!leland.Stanford.EDU!dayton.Stanford.EDU!lma
  3. From: lma@dayton.Stanford.EDU (Larry Augustin)
  4. Subject: How can a Unix process put itself in background?
  5. Message-ID: <lma.716056953@dayton.Stanford.EDU>
  6. Sender: news@leland.Stanford.EDU (Mr News)
  7. Organization: DSO, Stanford University
  8. Date:  9 Sep 92 16:42:33 GMT
  9. Lines: 23
  10.  
  11. Someone stopped by my office with this question yesterday.
  12.  
  13. A user invokes a program at the shell, and interacts with the program
  14. for a short time.  Eventually the user selects some "quit" option of
  15. the program.  Before the program really quits, it wants to go off and
  16. spend a minute or two checking some database files on disk.  Is there
  17. any way for the program to return control to the user's shell while it
  18. does the background stuff?  In effect, the program wants to "detach"
  19. itself from stdin/stdout, return control to the shell, and continue in
  20. background for a while before exiting.
  21.  
  22. The only solutions we could come up with were based on forking a child
  23. to do the background part.  is this the only way to do it?  Is there a
  24. solution that does not need a fork?
  25.  
  26. Thanks,
  27.  
  28. Larry
  29.  
  30. Larry M. Augustin            ERL 414, M/C 4055
  31. lma@dayton.stanford.edu            Computer Systems Lab
  32. +1 415.723.9285 (voice)            Stanford University
  33. +1 415.725.7398 (fax)            Stanford, CA 94305
  34.