STREAMS allows modules and drivers to cause a signal to be sent to user processes through a special signal message. If the signal specified by the module or driver is not SIGPOLL (see signal(5)), 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).
To let a process 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-5 describes the data available in the siginfo_t structure passed to the signal handler.
Table 3-5 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 |