STREAMS-UX Programmer's Guide (February 2007)

Message Types
Ordinary Messages
Appendix C
244
SO_ISTTY Notify the stream head that the stream is acting as a controlling terminal.
SO_ISNTTY Notify the stream head that the stream is no longer a controlling terminal.
For SO_ISTTY, the stream may or may not be allocated as a controlling terminal via an
M_SETOPTS message arriving upstream during open processing. If the stream head is opened
before receiving this message, the stream will not be allocated as a controlling terminal
until it is queued again by a session leader.
SO_NDELON Set non-STREAMS tty semantics for O_NDELAY (or O_NONBLOCK) processing on read (2) and
write (2) system calls. If O_NDELAY (or O_NONBLOCK) is set, a read (2) will return 0 if no data
is waiting to be read at the stream head. If O_NDELAY (or O_NONBLOCK) is clear, a read (2) will
block until data become available at the stream head.
Regardless of the state of O_NDELAY (or O_NONBLOCK), a write (2) will block on flow-control
and will block if buffers are not available.
If both SO_NDELON and SO_NDELOFF are set in the so_flags, SO_NDELOFF will have
precedence.
SO_NDELOFF Set STREAMS semantics for O_NDELAY (or O_NONBLOCK) processing on read (2) and write (2)
system calls. If O_NDELAY (or O_NONBLOCK) is set, a read (2) will return -1 and set EAGAIN if
no data is waiting to be read at the stream head. If O_NDELAY (or O_NONBLOCK) is clear, a
read (2) will block until data is available at the stream head.
If O_NDELAY (or O_NONBLOCK) is set, a write (2) will return -1 and set EAGAIN if flow-control is
in effect when the call is received. It will block if buffers are not available. If O_NDELAY (or
O_NONBLOCK) is set, part of the buffer has been written, and flow-control or buffers not
available condition is encountered, write (2) will terminate and return the number of bytes
written.
If O_NDELAY (or O_NONBLOCK) is clear, a write (2) will block on flow-control and will block if
buffers are not available.
This is the default. If both SO_NDELON and SO_NDELOFF are set in the so_flags, SO_NDELOFF
will have precedence.
In the STREAMS-based pipe mechanism, the behavior of read (2) and write (2) is different
for the O_NDELAY and O_NONBLOCK flags. See read (2) and write (2) for details.
SO_TOSTOP Notify the stream head to stop on background writes.
SO_TONSTOP Notify the stream head not to stop on background writes. The SO_TOSTOP and SO_TONSTOP
are used in conjunction with job control.
M_SIG
This message is generated by modules and drivers to post a signal to a process. On receipt of this message, the
stream head evaluates the first data byte of the message as a signal number, defined in <sys/signal.h>. The
associated signal is sent to the process(es) under following conditions:
•If the signal is SIGPOLL, it is sent only to those processes that have explicitly registered to receive the
signal (see I_SETSIG in streamio (7)).
If the signal is not SIGPOLL and the stream containing the sending module or driver is a controlling tty,
the signal is sent to the associated process group. A stream becomes the controlling tty for its process
group if, on open(), a module or driver sends an M_SETOPTS message to the stream head with the
SO_ISTTY flag set.