home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.internals
- Path: sparky!uunet!stanford.edu!leland.Stanford.EDU!dayton.Stanford.EDU!lma
- From: lma@dayton.Stanford.EDU (Larry Augustin)
- Subject: How can a Unix process put itself in background?
- Message-ID: <lma.716056953@dayton.Stanford.EDU>
- Sender: news@leland.Stanford.EDU (Mr News)
- Organization: DSO, Stanford University
- Date: 9 Sep 92 16:42:33 GMT
- Lines: 23
-
- Someone stopped by my office with this question yesterday.
-
- A user invokes a program at the shell, and interacts with the program
- for a short time. Eventually the user selects some "quit" option of
- the program. Before the program really quits, it wants to go off and
- spend a minute or two checking some database files on disk. Is there
- any way for the program to return control to the user's shell while it
- does the background stuff? 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?
-
- Thanks,
-
- Larry
-
- Larry M. Augustin ERL 414, M/C 4055
- lma@dayton.stanford.edu Computer Systems Lab
- +1 415.723.9285 (voice) Stanford University
- +1 415.725.7398 (fax) Stanford, CA 94305
-