User:Rob Kennedy/Signals


 * This is not a real article. It’s here for testing changes to the signal-related articles.

On POSIX-compliant platforms, SIGPOLL is the signal thrown by computer programs when a user wishes to interrupt the process. The symbolic constant for SIGPOLL is defined in the header file. Symbolic signal names are used because signal numbers can vary across platforms.

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  system call. IO stands for input/output.

Usage
As specified by POSIX, when the  operation is performed on a file descriptor with the   system call, the kernel is instructed to signal the calling process when a pollable event (i.e. one which would interrupt the   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 true asynchronous I/O without the conceptual overhead of a multiplexing  loop. A possible disadvantage is that the technique lends itself to producing spaghetti code, with race conditions a danger.

From POSIX 1003.1 (2003), it is preferred to use the standardised system calls for asynchronous I/O defined in. These allow requests to be queued for asynchronous execution; return and error status can be retrieved with the  and   functions, respectively.

Computing signals