Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 (Tek) 9/28/84 based on 9/17/84; site daemon.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!vax135!cornell!uw-beaver!tektronix!daemon!richl From: richl@daemon.UUCP (Rick Lindsley) Newsgroups: net.unix-wizards Subject: Re: 4.2 C Shell does *not* kill stopped jobs on logout. Message-ID: <567@daemon.UUCP> Date: Sun, 31-Mar-85 14:31:11 EST Article-I.D.: daemon.567 Posted: Sun Mar 31 14:31:11 1985 Date-Received: Tue, 2-Apr-85 05:48:15 EST References: <126@mcc-db.UUCP> <12244@watmath.UUCP> Reply-To: richl@daemon.UUCP (Rick Lindsley) Distribution: net Organization: Tektronix, Beaverton OR Lines: 28 Summary: Let's try to disseminate the correct information. The kernel does not indiscriminately kill orphan processes. The process only receives a SIGKILL when a) it is a child of init, and b) when it receives a "keyboard generated" stop signal (SIGTTOU, SIGTTIN, SIGTSTP). It can be made a child of init by orphaning it, true, but the given example % (date&)& only fails if the user has tostop set to prevent terminal writes. In that case it will receive a SIGTTOU as an orphan and be killed. Otherwise it works fine. Upon logout, all processes in the terminal process group will receive a SIGCONT and a SIGHUP. If you are using csh, the only process in the terminal process group will likely be the csh itself, because csh manipulates process groups. However, if you had ^Z'ed (SIGTSTP) any processes, then when you log out they become orphans and are thus SIGKILLed. If a process is running and its output will not cause a SIGTTOU (because it either produces none or the output has been redirected into a file) then it will continue running, untouched. If it were stopped with a SIGSTOP (not a keyboard generated stop), it will remain stopped. I might add that this is contrary to the information in tty(4), which states that orphans are allowed to write to a terminal without fear of a SIGTTOU, but that is a different story for a different time. Rick Lindsley ...{allegra,decvax,ihnp4}!tektronix!richl