The Linux Programming Interface

(nextflipdebug5) #1

394 Chapter 20


SIGTRAP
This signal is used to implement debugger breakpoints and system call
tracing, as performed by strace(1) (Appendix A). See the ptrace(2) manual
page for further information.
SIGTSTP
This is the job-control stop signal, sent to stop the foreground process
group when the user types the suspend character (usually Control-Z) on the
keyboard. Chapter 34 describes process groups ( jobs) and job control in
detail, as well as details of when and how a program may need to handle
this signal. The name of this signal derives from “terminal stop.”
SIGTTIN
When running under a job-control shell, the terminal driver sends this signal
to a background process group when it attempts to read() from the termi-
nal. This signal stops a process by default.
SIGTTOU
This signal serves an analogous purpose to SIGTTIN, but for terminal output
by background jobs. When running under a job-control shell, if the TOSTOP
(terminal output stop) option has been enabled for the terminal (perhaps via
the command stty tostop), the terminal driver sends SIGTTOU to a background
process group when it attempts to write() to the terminal (see Section 34.7.1).
This signal stops a process by default.
SIGUNUSED
As the name implies, this signal is unused. On Linux 2.4 and later, this signal
name is synonymous with SIGSYS on many architectures. In other words,
this signal number is no longer unused on those architectures, although
the signal name remains for backward compatibility.
SIGURG
This signal is sent to a process to indicate the presence of out-of-band (also
known as urgent) data on a socket (Section 61.13.1).
SIGUSR1
This signal and SIGUSR2 are available for programmer-defined purposes.
The kernel never generates these signals for a process. Processes may use
these signals to notify one another of events or to synchronize with each
other. In early UNIX implementations, these were the only two signals that
could be freely used in applications. (In fact, processes can send one
another any signal, but this has the potential for confusion if the kernel
also generates one of the signals for a process.) Modern UNIX implemen-
tations provide a large set of realtime signals that are also available for
programmer-defined purposes (Section 22.8).
Free download pdf