Path: utzoo!utgpu!water!watmath!clyde!rutgers!mcnc!decvax!decwrl!sun!pitstop!sundc!seismo!uunet!mcvax!ukc!its63b!simon From: simon@its63b.ed.ac.uk (ECSC68 S Brown CS) Newsgroups: comp.unix.questions Subject: Re: setting the control terminal (how?) Message-ID: <876@its63b.ed.ac.uk> Date: 11 Jan 88 00:32:38 GMT References: <435@picuxa.UUCP> <232@sortac.UUCP> Reply-To: simon@lfcs.ed.ac.uk (Simon Brown) Organization: LFCS, University of Edinburgh Lines: 29 In article <232@sortac.UUCP> pls@sortac.UUCP (Pat Sullivan) writes: >The setpgrp system calls in all versions of System V that I've seen >contain the same bug (feature??), which is actually rooted in the >tty drivers. The tty drivers do not always completely release their >controlling terminal when they are supposed to; this often prevents >"setpgrp" from functioning as one would expect. A setpgrp() will fail to work in a process which has already done a setgprp(). This happens most if a login-shell tries to grab a new terminal; it's doomed to failure, because a login-shell is exec'd by the getty program which has already done a setpgrp(). [It might be init that actually does it - I forget]. The really annoying part is that it doesn't *completely* release the control tty - it might be just about bearable if it left the original tty in place, but oh no, it has to leave you hanging in limbo instead. --Simon. -- -------------------------------------------------- | Simon Brown | | Laboratory for Foundations of Computer Science | | Department of Computer Science | | University of Edinburgh, Scotland, UK. | -------------------------------------------------- UUCP: uunet!mcvax!ukc!lfcs!simon ARPA: simon%lfcs.ed@nss.cs.ucl.ac.uk "Life's like that, you know" JANET: simon@uk.ac.ed.lfcs