STREAMS Programming Guide

signal Message

STREAMS enables modules and drivers to send a signal to user processes through a special signal message. If the signal specified by the module or driver is not SIGPOLL (see signal(3C)), the signal is sent to the process group associated with the stream. If the signal is SIGPOLL, the signal is only sent to processes that have registered for the signal by using the I_SETSIG ioctl(2).

Extended Signals

So that a process can obtain the band and event associated with SIGPOLL more readily, STREAMS supports extended signals. For the given events, a special code is defined in <sys/siginfo.h> that describes the reason SIGPOLL was generated. Table 3–6 describes the data available in the siginfo_t structure passed to the signal handler.

Table 3–6 Data in siginfo_t Structure

Event 

si_signo

si_code

si_band

si_errno

S_INPUT

 

SIGPOLL

POLL_IN

Band readable 

Unused 

S_OUTPUT

SIGPOLL

POLL_OUT

Band writable 

Unused 

S_MSG

SIGPOLL

POLL_MSG

Band signaled 

Unused 

S_ERROR

SIGPOLL

POLL_ERR

Unused 

stream error 

S_HANGUP

SIGPOLL

POLL_HUP

Unused 

Unused 

S_HIPRI

SIGPOLL

POLL_PRI

Unused 

Unused