> You're right. ``tcsetattr'' doesn't affect the ``TOSTOP'' flag, but it
> sends a SIGTTOU, when invoked from a background process.  This, in
> turn, causes the process to suspend unless SIGTTOU is blocked or
> ignored!
> 
> SUSv2 says, this is the correct behaviour:
> http://www.opennc.org/onlinepubs/007908799/xsh/tcsetattr.html:
> [...]
>       Attempts to use tcsetattr() from a process which is a member
>       of a background process group on a fildes associated with its
>       controlling terminal, will cause the process group to be sent
>       a SIGTTOU signal. If the calling process is blocking or
>       ignoring SIGTTOU signals, the process is allowed to perform
>       the operation, and no signal is sent.
> [...]

Thanks Michael.  The Solaris man page has this exact same paragraph,
although I can find no mention of this behaviour in the POSIX book I
have, the Linux man pages (surprise :-) or the Glibc docs.

FreeBSD termios(4) has this:

     Certain calls that set terminal parameters are treated in the
     same fashion as write, except that TOSTOP is ignored; that is,
     the effect is identical to that of terminal writes when TOSTOP
     is set.

which makes a lot more sense.

I guess it's another one of those dark corners that Volker seems to
wonder into with alarming regularity :)

Cheers,
        Simon

_______________________________________________
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to