Path: utzoo!dptcdc!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ukma!david From: david@ms.uky.edu (David Herron -- One of the vertebrae) Newsgroups: comp.mail.uucp Subject: Re: Bidirectional Modem Lines under SunOS 4.0.1 Message-ID: <11536@s.ms.uky.edu> Date: 18 Apr 89 21:38:09 GMT References: <160@osc.COM> <743@key.COM> <2209@laidbak.UUCP> <3834@ficc.uu.net> <433@iisat.UUCP> <1446@auspex.auspex.com> Reply-To: david@ms.uky.edu (David Herron -- One of the vertebrae) Organization: U of Kentucky, Mathematical Sciences Lines: 29 In article <1446@auspex.auspex.com> guy@auspex.auspex.com (Guy Harris) writes: >>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 "-". Further ... on systems running X to "log into" some other system you commonly do rsh host xterm -display host:0.0 blah blah and one of the options to xterm is to make it a "login window". It does this by putting that '-' in argv[0]. But the xterm process stays there between the shell and init, the shell's parent is *NOT* init. And if you think about it long enough, the shells parent *CANNOT* be init since xterm has to get all these characters going in and out of the window and to X type things with them. For that matter, rlogin works similarly... -- <- David Herron; an MMDF guy <- ska: David le casse\*' {rutgers,uunet}!ukma!david, david@UKMA.BITNET <- <- The problem with mnemonics is they mean different things to different people.