Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site watmath.UUCP Path: utzoo!watmath!idallen From: idallen@watmath.UUCP Newsgroups: net.unix-wizards Subject: 4.2 C Shell does *not* kill stopped jobs on logout. Message-ID: <12244@watmath.UUCP> Date: Fri, 29-Mar-85 03:20:32 EST Article-I.D.: watmath.12244 Posted: Fri Mar 29 03:20:32 1985 Date-Received: Fri, 29-Mar-85 06:02:44 EST References: <126@mcc-db.UUCP> Reply-To: idallen@watmath.UUCP (Ian! D. Allen) Distribution: net Organization: U of Waterloo, Ontario Lines: 24 The C Shell does not kill stopped jobs on logout. The 4.2bsd kernel does. The 4.2bsd kernel SIGKILLs stopped jobs when their parents die. Running jobs are orphaned (inherited by INIT, process #1), but if an orphan tries to SIGTSTP or stop because of SIGTTOU or SIGTTIN then it, too, will be SIGKILLed by the kernel. Compare: % stty tostop # stop job if it tries tty output in background % set notify # tell me about background job status ASAP % date & [1] 12345 [1] Stopped (tty output) % ( date & ) % The date in the subshell produces no output, because it gets orphaned when the subshell finishes spawning it, and when it tries to print on your tty it tries to stop because of SIGTTOU, and the kernel kills it. You can fix this (I did) so that background jobs of sub-shells ignore SIGTTOU, and thus avoid the fascist behaviour of the kernel. -- -IAN! (Ian! D. Allen) University of Waterloo