Path: utzoo!mnetor!uunet!mcvax!ukc!its63b!simon From: simon@its63b.ed.ac.uk (ECSC68 S Brown CS) Newsgroups: comp.unix.wizards Subject: Re: Setting process groups Message-ID: <815@its63b.ed.ac.uk> Date: 7 Dec 87 10:30:32 GMT References: <1765@unc.cs.unc.edu> <910@mcgill-vision.UUCP> <1261@saturn.ucsc.edu> <3134@psuvax1.psu.edu> <2990@hcr.UUCP> Reply-To: simon@lfcs.ed.ac.uk (Simon Brown) Organization: LFCS, University of Edinburgh Lines: 29 In article <2990@hcr.UUCP> writes: >Actually SVID setpgrp() has an "extra feature" that Berkeley setpgrp(getpid()) >does not have - it detaches the process from its controlling terminal. This >does tend to make it "difficult" to create a pipeline attached to your terminal >but with its own process group. Well, you can do that by making each such pipeline belong to it's own SXT device, and have all these SXT's multiplexed onto your *real* terminal. Instant job-control! BTW, SVR2 (and 3?) setpgrp() doesn't fully detach a process from its controlling tty if this process has already done a setpgrp() previously (as is the case for a login-shell -- this comes from init and getty). What it does in this case is to "partially" detach -- so that if you try to set up a new controlling terminal, it's not actually a controlling terminal at all -- things like terminal-generated signals don't get sent to the process. Presumably this is just a cretinous bug, and not something more sophisticated. -- -------------------------------------------------- | 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