Path: utzoo!dptcdc!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.mail.uucp Subject: Re: Bidirectional Modem Lines under SunOS 4.0.1 Message-ID: <1446@auspex.auspex.com> Date: 17 Apr 89 19:14:05 GMT References: <160@osc.COM> <743@key.COM> <2209@laidbak.UUCP> <3834@ficc.uu.net> <433@iisat.UUCP> Reply-To: guy@auspex.auspex.com (Guy Harris) Organization: Auspex Systems, Santa Clara Lines: 22 >The parent of 'sh' has to be init, because that is the only indication that >the program has that it is the login shell as apposed to a shell called >by another program/shell. Nonsense. The closest thing to a "standard" indication that a shell is a login shell, in UNIX, is that argv[0] (or the last component thereof) begins with "-". Neither the Bourne nor the C shell, in S5 or 4.xBSD, check the parent process ID; they both check whether "argv[0]" begins with "-". >I suspect it is also the one that sends hangup signals to all other processes >in the same process group etc. This sentence has a dangling reference; "it" in "it is also the one that sends hangup signals" doesn't refer to anything obvious. In S5, the hangup signal that's sent to all other processes in a process group when the process group leader exits is sent by the kernel. A process group leader is defined as a process whose process ID is equal to its process group ID; for the signal to be sent, the process must also have a controlling tty, and that controlling tty's process group must be the process group of the process in question. Having a parent process ID of 1 has nothing to do with it.