home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!ira.uka.de!smurf.sub.org!news
- From: urlichs@smurf.sub.org (Matthias Urlichs)
- Newsgroups: comp.unix.internals
- Subject: Re: How can a Unix process put itself in background?
- Date: 13 Sep 1992 16:46:02 +0200
- Organization: University of Karlsruhe, FRG
- Lines: 23
- Message-ID: <18vk7aINN5b2@smurf.smurf.sub.org>
- References: <1992Sep11.222546.3878@tandem.com> <18rlr4INNi23@early-bird.think.com> <ceggQDG00VozICsUcq@andrew.cmu.edu>
- NNTP-Posting-Host: 127.0.0.1
-
- In comp.unix.internals, article <ceggQDG00VozICsUcq@andrew.cmu.edu>,
- fl0p+@andrew.cmu.edu (Frank T Lofaro) writes:
- > This is a real obscene way of getting it to work, and it very well might
- > not work. However, you should give it a try:
- >
- [ Fork a child, stop the parent, make child continue parent and exit ]
-
- I thought of this too, and it's sick. :-) The only problem is that the shell
- doesn't notice when the process continues; its state is still "stopped" until
- you put it into the background, which of course has no effect on the process.
-
- Job control works as expected, i.e. when the backgrounded process tries to
- read/write stdin it gets SIGTTIN/SIGTTOU and you can "fg" it from there.
- setsid() and setpgrp() don't seem to affect its behavior if you leave
- stdin/stdout alone.
-
- --
- Well, see, Joyce, there we were, trapped in the elevator. Now, I had
- my tennis racquet and the goldfish; she was holding the Crisco. Surely
- you can imagine how one thing naturally led to another!
- --
- Matthias Urlichs -- urlichs@smurf.sub.org -- urlichs@smurf.ira.uka.de /(o\
- Humboldtstrasse 7 -- 7500 Karlsruhe 1 -- Germany -- +49-721-9612521 \o)/
-