Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!decvax!ucbvax!sdcsvax!im4u!ut-sally!utah-cs!utah-gr!thomas From: thomas@utah-gr.UUCP (Spencer W. Thomas) Newsgroups: net.unix-wizards Subject: Re: SIGTTOU Message-ID: <1829@utah-gr.UUCP> Date: Sun, 19-Oct-86 13:41:48 EDT Article-I.D.: utah-gr.1829 Posted: Sun Oct 19 13:41:48 1986 Date-Received: Mon, 20-Oct-86 21:12:30 EDT References: <163@bobkat.UUCP> Reply-To: thomas@utah-gr.UUCP (Spencer W. Thomas) Distribution: na Organization: University of Utah CS Dept Lines: 23 Keywords: SIGTTOU LTOSTOP TIOCPGRP ioctl setpgrp In article <163@bobkat.UUCP> m5@bobkat.UUCP (Mr Mike McNally) writes: >Regardless of the setting of the LTOSTOP bit in the local modes, the >driver sends SIGTTOU upon the call to "ioctl". I suppose I can agree >with the signal being sent if LTOSTOP were set (although I have not >seen any documentation indicating that the signal should be sent). >However, my notion of the purpose of LTOSTOP is that it prevents the >driver from EVER sending a SIGTTOU. Well, the reasoning is that a process with a different pgroup is NOT the current "foreground" process, and should therefore not be allowed to change the tty modes. SIGTTOU is indeed sent in this case. LTOSTOP is used to enable/disable sending of this signal to processes that attempt to do output to the terminal when they are "background". It thus basically disallows background processes from printing if set. Background processes are ALWAYS disallowed from changing tty modes. To do what you are trying to do, you need to first open /dev/tty and do a TIOCNOTTY ioctl on it. Then you can do the TIOCSPGRP call. Apparently this is "fixed" in 4.3. -- =Spencer ({ihnp4,decvax}!utah-cs!thomas, thomas@utah-cs.ARPA)