Path: utzoo!utgpu!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: <11549@s.ms.uky.edu> Date: 20 Apr 89 21:06:08 GMT References: <160@osc.COM> <743@key.COM> <2209@laidbak.UUCP> <3834@ficc.uu.net> <11536@s.ms.uky.edu> <3914@ficc.uu.net> Reply-To: david@ms.uky.edu (David Herron -- One of the vertebrae) Organization: U of Kentucky, Mathematical Sciences Lines: 41 In article <3914@ficc.uu.net> peter@ficc.uu.net (Peter da Silva) writes: >In article <11536@s.ms.uky.edu>, david@ms.uky.edu (David Herron -- One of the vertebrae) writes: >> 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. > >Why does the shell's parent have to be xterm to satisfy this requirement? As I described before -- xterm's job (and that of rlogind as well) is to handle the characters going in and out of the terminal session. On systems with which I am familiar characters flow in/out of a /dev/tty thing directly to the process(es). With xterm/rlogind it is the same except it's a /dev/ttyp thing. Also the characters, instead of going out a physical device (or in to the physical device) go out (or in) another process -- xterm or rlogind. The xterm & rlogind processes are conventionally the parent of the shell because they take on the task of crafting up the environment surrounding the pty. Also they need to know when the child exits so that they can clean up after themselves. This is most easily done if they are the partent of the shell so that they receive SIGCHILD (SIGCLD) and/or SIGHUP signals. Or so that wait()'s return. Or whatever exact mechanism is being used. But right now I can't think of a good reason why it *MUST* be the way it is now. I can envision that init could treat the pty's as any other terminal device with a process hanging on 'em that'd start up a /bin/login when the other end of the pty was opened. But then we wouldn't be able to just use a pty without having to log in. No more *shell* windows in Emacs, no more script(1), no more rlogin with .rhosts allowing you an automagic login. -- <- 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.