Advanced Programming in the UNIX® Environment

(lily) #1
ptg10805159

Section 10.2 Signal Concepts 319


SIGINT This signal is generated by the terminal driver when we press the
interrupt key (often DELETE or Control-C). This signal is sent to all
processes in the foreground process group (refer to Figure9.9). This
signal is often used to terminate a runaway program, especially when it’s
generating a lot of unwanted output on the screen.
SIGIO This signal indicates an asynchronous I/O event. We discuss it in
Section 14.5.2.

In Figure10.1, we labeled the default action forSIGIOas either ‘‘terminate’’or
‘‘ignore.’’Unfortunately,the default depends on the system. Under System V,
SIGIOis identical toSIGPOLL, so its default action is to terminate the process.
Under BSD, the default is to ignorethe signal.
Linux 3.2.0 and Solaris 10 defineSIGIOto be the same value asSIGPOLL,so
the default behavior is to terminate the process. On FreeBSD 8.0 and Mac OS X
10.6.8, the default is to ignorethe signal.

SIGIOT This indicates an implementation-defined hardwarefault.

The name IOT comes from the PDP-11 mnemonic for the ‘‘input/output TRAP’’
instruction. Earlier versions of System V generated this signal from theabort
function.SIGABRTis now used for this purpose.
On FreeBSD 8.0, Linux 3.2.0, Mac OS X 10.6.8, and Solaris 10,SIGIOTis defined
to be the same value asSIGABRT.

SIGJVM1 Asignal reserved for use by the Java virtual machine on Solaris.

SIGJVM2 Another signal reserved for use by the Java virtual machine on Solaris.
SIGKILL This signal is one of the two that can’t be caught or ignored. It provides
the system administrator with a sureway to kill any process.

SIGLOST This signal is used to notify a process running on a Solaris NFSv4 client
system that a lock could not be reacquired during recovery.
SIGLWP This signal is used internally by the Solaris threads library; it is not
available for general use. On FreeBSD,SIGLWPis defined to be an alias
forSIGTHR.
SIGPIPE If we write to a pipeline but the reader has terminated, SIGPIPEis
generated. Wedescribe pipes in Section 15.2. This signal is also
generated when a process writes to a socket of typeSOCK_STREAMthat
is no longer connected.We describe sockets in Chapter 16.

SIGPOLL This signal is marked obsolescent in SUSv4, so it might be removed in a
futureversion of the standard. It can be generated when a specific event
occurs on a pollable device. We describe this signal with the poll
function in Section 14.4.2. SIGPOLLoriginated with SVR3, and loosely
corresponds to the BSDSIGIOandSIGURGsignals.

On Linux and Solaris,SIGPOLLis defined to have the same value asSIGIO.
Free download pdf