SIGTTOU

Spencer W. Thomas thomas at utah-gr.UUCP
Mon Oct 20 03:41:48 AEST 1986


In article <163 at bobkat.UUCP> m5 at 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 at utah-cs.ARPA)



More information about the Comp.unix.wizards mailing list