SIGTTOU

Mr Mike McNally m5 at bobkat.UUCP
Wed Oct 15 23:44:55 AEST 1986


I have recently discovered a feature of the 4.2 tty driver which seems
contrary to the documentation.  The code to produce the effect is as
follows:

/*
    variable "new_pgrp_id" contains a valid process group identifier
    which is different from the distinguished process group for the
    terminal open on channel "tty_fd".
*/

    setpgrp(0, new_pgrp_id);
    ioctl(tty_fd, TIOCSPGRP, &new_pgrp_id);

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.

Am I just a babe-in-the-UNIX-woods for believing the tty(4)
documentation?  Is there a good reason for SIGTTOU to be sent
unconditionally upon ioctl calls from non-distinguished process group
processes which change the settings of the tty?

-- 
****                                                         ****
**** At Digital Lynx, we're almost in Garland, but not quite ****
****                                                         ****

Mike McNally                                    Digital Lynx Inc.
Software (not hardware) Person                  Dallas  TX  75243
uucp: ...convex!ctvax!bobkat!m5                 (214) 238-7474



More information about the Comp.unix.wizards mailing list