Path: utzoo!mnetor!uunet!husc6!hao!oddjob!gargoyle!ihnp4!homxb!mtuxo!mtune!akgua!sortac!pls From: pls@sortac.UUCP (Pat Sullivan) Newsgroups: comp.unix.questions Subject: Re: setting the control terminal (how?) Message-ID: <232@sortac.UUCP> Date: 6 Jan 88 15:15:08 GMT References: <435@picuxa.UUCP> Reply-To: pls@sortac.UUCP (Pat Sullivan) Organization: AT&T Southern Region, Atlanta Lines: 23 In article <435@picuxa.UUCP> gp@picuxa.UUCP (Greg Pasquariello X1190) writes: >I was wondering if anyone out there could help me with this. I have a process >that needs to set it's own process group, and it's own control terminal. From >what I thought, the terminal device driver would set the process group control >terminal upon the first tty open after the setpgrp() (phew!). 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. This problem may be eliminated by changing one or two lines in the "close" call of each tty driver and one line in the "setpgrp" call (the exit routine currently cleans up the garbage pointers that the tty drivers leave lying around). I'll be glad to share more details (for AT&T 3B tty drivers only) with anyone who has a source license and is interested in kernel hacking. Much better would be a standard, official resolution, but one does not seem to be forthcoming. =================================================================== Pat Sullivan - {gatech|akgua|ihnp4}!sortac!pls - voice 404-257-7382