- SIGPOLL
Infobox Computing signal
description = Pollable event (Sys V); synonym of SIGIO
action = Abnormal termination of the process
POLL_IN | Data input available
POLL_OUT | Output buffers available
POLL_MSG | Input message available
POLL_ERR | I/O error
POLL_PRI | High priority input available
POLL_HUP | Device disconnectedOnPOSIX -compliant platforms, SIGPOLL is the signal thrown bycomputer program s when asynchronous I/O event occurs. The symbolic constant for SIGPOLL is defined in theheader file
. Symbolic signal names are used because signal numbers can vary across platforms.signal.h On
Linux , SIGIO is a synonym for SIGPOLL.Etymology
"SIG" is a common prefix for signal names. "POLL" refers to polling, in the context of the
poll
system call . "IO" stands forinput/output .Usage
As specified by POSIX, when the
I_SETSIG
operation is performed on afile descriptor with theioctl
system call, the kernel is instructed to signal the calling process when a "pollable event" (i.e. one which would interrupt thepoll
system call) occurs on the file descriptor; for example when input or output becomes possible. The signal sent may be user-specified, but defaults to SIGPOLL. By employing this mechanism, the user may accomplish trueasynchronous I/O without the conceptual overhead of amultiplexing select
loop. A possible disadvantage is that the technique lends itself to producingspaghetti code , withrace conditions a danger.From POSIX 1003.1 (2003), it is preferred to use the standardised system calls for asynchronous I/O defined in
aio.h
. These allow requests to be queued forasynchronous execution; return and error status can be retrieved with theaio_return
andaio_error
functions, respectively.
Wikimedia Foundation. 2010.