Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!ut-sally!std-unix From: std-unix@ut-sally.UUCP (Moderator, John Quarterman) Newsgroups: mod.std.unix Subject: Re: mod.std.unix P1003 job control proposal Message-ID: <6205@ut-sally.UUCP> Date: Mon, 3-Nov-86 14:34:33 EST Article-I.D.: ut-sally.6205 Posted: Mon Nov 3 14:34:33 1986 Date-Received: Tue, 4-Nov-86 05:36:08 EST Organization: IEEE P1003 Portable Operating System for Computer Environments Committee Lines: 39 Approved: jsq@sally.utexas.edu From: guy@sun.com (Guy Harris) Date: Mon, 3 Nov 86 00:39:00 PST > > > If the process is a session process group leader, the > > > SIGHUP signal may be sent to each process that has a > > ^^^ should be replaced by the word "will" > > > process group ID equal to that of the calling process; > "May" is used here to allow 4.2 systems to conform. 4.2 does not > send SIGHUP on process group leader death. 4.2 also doesn't have the notion of a "session process group leader". However, when the moral equivalent of a "session process group leader" dies in 4.2, 99.99% of the time it's a login shell, and "init" proceeds to do a "vhangup" which - sends a SIGHUP! > vhangup() is indeed desirable. It is not required in POSIX because it is > not supported on System V and, indeed, breaks System V compatiblity. Only if you define "System V compatibility" as "behaves exactly the same as some particular implementation of System V". "vhangup" does two things; it sends a SIGHUP to the process group of the terminal in question (which is, in fact, similar to what S5 does automatically) and it invalidates file descriptors that refer to the terminal. Some System V implementations do not do this, although they *do* clear the terminal's process group, which causes all subsequent references to that terminal through "/dev/tty" to get an error. As such, the evidence indicates that the reason they don't generally invalidate references to the controlling terminal is *not* that they intended to leave such references valid, but that they just didn't bother. The only programs *I* can think of that would want to be able to reference the terminal they were started from, even after the user who started them logged out, are not the sort of programs I would like to have running on any machine I'm involved with. They tend to be called things like "Trojan horses". Volume-Number: Volume 8, Number 20