<s>
Signals	O
are	O
standardized	O
messages	O
sent	O
to	O
a	O
running	O
program	B-Application
to	O
trigger	O
specific	O
behavior	O
,	O
such	O
as	O
quitting	O
or	O
error	B-General_Concept
handling	I-General_Concept
.	O
</s>
<s>
They	O
are	O
a	O
limited	O
form	O
of	O
inter-process	B-Operating_System
communication	I-Operating_System
(	O
IPC	O
)	O
,	O
typically	O
used	O
in	O
Unix	B-Application
,	O
Unix-like	B-Operating_System
,	O
and	O
other	O
POSIX-compliant	O
operating	O
systems	O
.	O
</s>
<s>
A	O
signal	O
is	O
an	O
asynchronous	O
notification	O
sent	O
to	O
a	O
process	B-Operating_System
or	O
to	O
a	O
specific	O
thread	B-Operating_System
within	O
the	O
same	O
process	B-Operating_System
to	O
notify	O
it	O
of	O
an	O
event	O
.	O
</s>
<s>
Common	O
uses	O
of	O
signals	O
are	O
to	O
interrupt	B-Application
,	O
suspend	O
,	O
terminate	B-Operating_System
or	O
kill	B-Operating_System
a	O
process	B-Operating_System
.	O
</s>
<s>
Signals	O
originated	O
in	O
1970s	O
Bell	O
Labs	O
Unix	B-Application
and	O
were	O
later	O
specified	O
in	O
the	O
POSIX	O
standard	O
.	O
</s>
<s>
When	O
a	O
signal	O
is	O
sent	O
,	O
the	O
operating	O
system	O
interrupts	B-Application
the	O
target	O
process	B-Operating_System
 '	O
normal	O
flow	O
of	O
execution	O
to	O
deliver	O
the	O
signal	O
.	O
</s>
<s>
Execution	O
can	O
be	O
interrupted	O
during	O
any	O
non-atomic	B-General_Concept
instruction	I-General_Concept
.	O
</s>
<s>
If	O
the	O
process	B-Operating_System
has	O
previously	O
registered	O
a	O
signal	O
handler	O
,	O
that	O
routine	O
is	O
executed	O
.	O
</s>
<s>
Embedded	O
programs	O
may	O
find	O
signals	O
useful	O
for	O
inter-process	B-Operating_System
communications	I-Operating_System
,	O
as	O
signals	O
are	O
notable	O
for	O
their	O
Algorithmic	B-General_Concept
efficiency	I-General_Concept
.	O
</s>
<s>
Signals	O
are	O
similar	O
to	O
interrupts	B-Application
,	O
the	O
difference	O
being	O
that	O
interrupts	B-Application
are	O
mediated	O
by	O
the	O
CPU	B-General_Concept
and	O
handled	O
by	O
the	O
kernel	B-Operating_System
while	O
signals	O
are	O
mediated	O
by	O
the	O
kernel	B-Operating_System
(	O
possibly	O
via	O
system	B-Operating_System
calls	I-Operating_System
)	O
and	O
handled	O
by	O
individual	O
processes	O
.	O
</s>
<s>
The	O
kernel	B-Operating_System
may	O
pass	O
an	O
interrupt	B-Application
as	O
a	O
signal	O
to	O
the	O
process	B-Operating_System
that	O
caused	O
it	O
(	O
typical	O
examples	O
are	O
SIGSEGV	B-Error_Name
,	O
SIGBUS	B-General_Concept
,	O
SIGILL	O
and	O
SIGFPE	B-General_Concept
)	O
.	O
</s>
<s>
Version	B-Operating_System
1	I-Operating_System
Unix	I-Operating_System
(	O
1971	O
)	O
had	O
separate	O
system	B-Operating_System
calls	I-Operating_System
to	O
catch	O
interrupts	B-Application
,	O
quits	O
,	O
and	O
machine	O
traps	B-Application
.	O
</s>
<s>
appeared	O
in	O
Version	B-Operating_System
2	I-Operating_System
(	O
1972	O
)	O
.	O
</s>
<s>
Version	B-Operating_System
4	I-Operating_System
(	O
1973	O
)	O
combined	O
all	O
traps	B-Application
into	O
one	O
call	O
,	O
.	O
</s>
<s>
Version	B-Operating_System
5	I-Operating_System
(	O
1974	O
)	O
could	O
send	O
arbitrary	O
signals	O
.	O
</s>
<s>
In	O
Version	B-Operating_System
7	I-Operating_System
(	O
1979	O
)	O
each	O
numbered	O
trap	B-Application
received	O
a	O
symbolic	O
name	O
.	O
</s>
<s>
Plan	B-Operating_System
9	I-Operating_System
from	I-Operating_System
Bell	I-Operating_System
Labs	I-Operating_System
(	O
mid	O
80s	O
)	O
replaced	O
signals	O
with	O
notes	O
,	O
which	O
permit	O
sending	O
short	O
,	O
arbitrary	O
strings	O
.	O
</s>
<s>
The	O
system	B-Operating_System
call	I-Operating_System
sends	O
a	O
specified	O
signal	O
to	O
a	O
specified	O
process	B-Operating_System
,	O
if	O
permissions	O
allow	O
.	O
</s>
<s>
The	O
library	O
function	O
sends	O
the	O
specified	O
signal	O
to	O
the	O
current	O
process	B-Operating_System
.	O
</s>
<s>
Exceptions	B-General_Concept
such	O
as	O
division	B-Algorithm
by	I-Algorithm
zero	I-Algorithm
,	O
segmentation	B-Error_Name
violation	I-Error_Name
(	O
SIGSEGV	B-Error_Name
)	O
,	O
and	O
floating	B-Algorithm
point	I-Algorithm
exception	B-General_Concept
(	O
SIGFPE	B-General_Concept
)	O
will	O
cause	O
a	O
core	B-Error_Name
dump	I-Error_Name
and	O
terminate	B-Operating_System
the	O
program	B-Application
.	O
</s>
<s>
The	O
kernel	B-Operating_System
can	O
generate	O
signals	O
to	O
notify	O
processes	O
of	O
events	O
.	O
</s>
<s>
For	O
example	O
,	O
SIGPIPE	O
will	O
be	O
generated	O
when	O
a	O
process	B-Operating_System
writes	O
to	O
a	O
pipe	B-Operating_System
which	O
has	O
been	O
closed	O
by	O
the	O
reader	O
;	O
by	O
default	O
,	O
this	O
causes	O
the	O
process	B-Operating_System
to	O
terminate	B-Operating_System
,	O
which	O
is	O
convenient	O
when	O
constructing	O
shell	B-Operating_System
pipelines	I-Operating_System
.	O
</s>
<s>
Typing	O
certain	O
key	O
combinations	O
at	O
the	O
controlling	B-General_Concept
terminal	I-General_Concept
of	O
a	O
running	O
process	B-Operating_System
causes	O
the	O
system	O
to	O
send	O
it	O
certain	O
signals	O
:	O
</s>
<s>
Ctrl-C	B-Device
(	O
in	O
older	O
Unixes	B-Application
,	O
DEL	O
)	O
sends	O
an	O
INT	O
signal	O
(	O
"	O
interrupt	B-Application
"	O
,	O
SIGINT	O
)	O
;	O
by	O
default	O
,	O
this	O
causes	O
the	O
process	B-Operating_System
to	O
terminate	B-Operating_System
.	O
</s>
<s>
Ctrl-Z	O
sends	O
a	O
TSTP	O
signal	O
(	O
"	O
terminal	O
stop	O
"	O
,	O
SIGTSTP	B-General_Concept
)	O
;	O
by	O
default	O
,	O
this	O
causes	O
the	O
process	B-Operating_System
to	O
suspend	O
execution	O
.	O
</s>
<s>
Ctrl-	B-Device
\	I-Device
sends	O
a	O
QUIT	O
signal	O
(	O
SIGQUIT	O
)	O
;	O
by	O
default	O
,	O
this	O
causes	O
the	O
process	B-Operating_System
to	O
terminate	B-Operating_System
and	O
dump	B-Error_Name
core	I-Error_Name
.	O
</s>
<s>
Ctrl-T	B-Device
(	O
not	O
supported	O
on	O
all	O
UNIXes	B-Application
)	O
sends	O
an	O
INFO	O
signal	O
(	O
SIGINFO	O
)	O
;	O
by	O
default	O
,	O
and	O
if	O
supported	O
by	O
the	O
command	O
,	O
this	O
causes	O
the	O
operating	O
system	O
to	O
show	O
information	O
about	O
the	O
running	O
command	O
.	O
</s>
<s>
Signal	O
handlers	O
can	O
be	O
installed	O
with	O
the	O
or	O
system	B-Operating_System
call	I-Operating_System
.	O
</s>
<s>
The	O
process	B-Operating_System
can	O
also	O
specify	O
two	O
default	O
behaviors	O
,	O
without	O
creating	O
a	O
handler	O
:	O
ignore	O
the	O
signal	O
(	O
SIG_IGN	O
)	O
and	O
use	O
the	O
default	O
signal	O
handler	O
(	O
SIG_DFL	O
)	O
.	O
</s>
<s>
There	O
are	O
two	O
signals	O
which	O
cannot	O
be	O
intercepted	O
and	O
handled	O
:	O
SIGKILL	O
and	O
SIGSTOP	B-General_Concept
.	O
</s>
<s>
Signal	O
handling	O
is	O
vulnerable	O
to	O
race	B-Operating_System
conditions	I-Operating_System
.	O
</s>
<s>
As	O
signals	O
are	O
asynchronous	O
,	O
another	O
signal	O
(	O
even	O
of	O
the	O
same	O
type	O
)	O
can	O
be	O
delivered	O
to	O
the	O
process	B-Operating_System
during	O
execution	O
of	O
the	O
signal	O
handling	O
routine	O
.	O
</s>
<s>
The	O
call	O
can	O
be	O
used	O
to	O
block	B-Operating_System
and	O
unblock	O
delivery	O
of	O
signals	O
.	O
</s>
<s>
Blocked	O
signals	O
are	O
not	O
delivered	O
to	O
the	O
process	B-Operating_System
until	O
unblocked	O
.	O
</s>
<s>
Signals	O
that	O
cannot	O
be	O
ignored	O
(	O
SIGKILL	O
and	O
SIGSTOP	B-General_Concept
)	O
cannot	O
be	O
blocked	O
.	O
</s>
<s>
Signals	O
can	O
cause	O
the	O
interruption	O
of	O
a	O
system	B-Operating_System
call	I-Operating_System
in	O
progress	O
,	O
leaving	O
it	O
to	O
the	O
application	O
to	O
manage	O
a	O
non-transparent	B-Operating_System
restart	I-Operating_System
.	O
</s>
<s>
alteration	O
,	O
signal	O
mask	O
alteration	O
,	O
signal	O
disposition	O
change	O
,	O
and	O
other	O
global	O
process	B-Operating_System
attribute	O
changes	O
.	O
</s>
<s>
In	O
particular	O
,	O
the	O
POSIX	O
specification	O
and	O
the	O
Linux	B-Application
man	O
page	O
require	O
that	O
all	O
system	O
functions	O
directly	O
or	O
indirectly	O
called	O
from	O
a	O
signal	O
function	O
are	O
async-signal	O
safe	O
.	O
</s>
<s>
The	O
man	O
page	O
gives	O
a	O
list	O
of	O
such	O
async-signal	O
safe	O
system	O
functions	O
(	O
practically	O
the	O
system	B-Operating_System
calls	I-Operating_System
)	O
,	O
otherwise	O
it	O
is	O
an	O
undefined	B-Language
behavior	I-Language
.	O
</s>
<s>
Signal	O
handlers	O
can	O
instead	O
put	O
the	O
signal	O
into	O
a	O
queue	B-Application
and	O
immediately	O
return	O
.	O
</s>
<s>
The	O
main	O
thread	B-Operating_System
will	O
then	O
continue	O
"	O
uninterrupted	O
"	O
until	O
signals	O
are	O
taken	O
from	O
the	O
queue	B-Application
,	O
such	O
as	O
in	O
an	O
event	B-General_Concept
loop	I-General_Concept
.	O
</s>
<s>
"	O
Uninterrupted	O
"	O
here	O
means	O
that	O
operations	O
that	O
block	B-Operating_System
may	O
return	O
prematurely	O
and	O
must	B-Operating_System
be	I-Operating_System
resumed	I-Operating_System
,	O
as	O
mentioned	O
above	O
.	O
</s>
<s>
Signals	O
should	O
be	O
processed	O
from	O
the	O
queue	B-Application
on	O
the	O
main	O
thread	B-Operating_System
and	O
not	O
by	O
worker	B-Operating_System
pools	I-Operating_System
,	O
as	O
that	O
reintroduces	O
the	O
problem	O
of	O
asynchronicity	O
.	O
</s>
<s>
However	O
,	O
managing	O
a	O
queue	B-Application
is	O
not	O
possible	O
in	O
an	O
async-signal	O
safe	O
way	O
with	O
only	O
,	O
as	O
only	O
single	O
reads	O
and	O
writes	O
to	O
such	O
variables	O
are	O
guaranteed	O
to	O
be	O
atomic	O
,	O
not	O
increments	O
or	O
(	O
fetch-and	O
)	O
-decrements	O
,	O
as	O
would	O
be	O
required	O
for	O
a	O
queue	B-Application
.	O
</s>
<s>
A	O
process	B-Operating_System
's	O
execution	O
may	O
result	O
in	O
the	O
generation	O
of	O
a	O
hardware	B-General_Concept
exception	I-General_Concept
,	O
for	O
instance	O
,	O
if	O
the	O
process	B-Operating_System
attempts	O
to	O
divide	B-Algorithm
by	I-Algorithm
zero	I-Algorithm
or	O
incurs	O
a	O
page	B-General_Concept
fault	I-General_Concept
.	O
</s>
<s>
In	O
Unix-like	B-Operating_System
operating	I-Operating_System
systems	I-Operating_System
,	O
this	O
event	O
automatically	O
changes	O
the	O
processor	O
context	B-Operating_System
to	O
start	O
executing	O
a	O
kernel	B-Operating_System
exception	B-General_Concept
handler	I-General_Concept
.	O
</s>
<s>
In	O
case	O
of	O
some	O
exceptions	B-General_Concept
,	O
such	O
as	O
a	O
page	B-General_Concept
fault	I-General_Concept
,	O
the	O
kernel	B-Operating_System
has	O
sufficient	O
information	O
to	O
fully	O
handle	O
the	O
event	O
itself	O
and	O
resume	O
the	O
process	B-Operating_System
's	O
execution	O
.	O
</s>
<s>
Other	O
exceptions	B-General_Concept
,	O
however	O
,	O
the	O
kernel	B-Operating_System
cannot	O
process	B-Operating_System
intelligently	O
and	O
it	O
must	O
instead	O
defer	O
the	O
exception	B-General_Concept
handling	I-General_Concept
operation	O
to	O
the	O
faulting	O
process	B-Operating_System
.	O
</s>
<s>
This	O
deferral	O
is	O
achieved	O
via	O
the	O
signal	O
mechanism	O
,	O
wherein	O
the	O
kernel	B-Operating_System
sends	O
to	O
the	O
process	B-Operating_System
a	O
signal	O
corresponding	O
to	O
the	O
current	O
exception	B-General_Concept
.	O
</s>
<s>
For	O
example	O
,	O
if	O
a	O
process	B-Operating_System
attempted	O
integer	O
divide	B-Algorithm
by	I-Algorithm
zero	I-Algorithm
on	O
an	O
x86	B-Operating_System
CPU	B-General_Concept
,	O
a	O
divide	O
error	O
exception	B-General_Concept
would	O
be	O
generated	O
and	O
cause	O
the	O
kernel	B-Operating_System
to	O
send	O
the	O
SIGFPE	B-General_Concept
signal	O
to	O
the	O
process	B-Operating_System
.	O
</s>
<s>
Similarly	O
,	O
if	O
the	O
process	B-Operating_System
attempted	O
to	O
access	O
a	O
memory	O
address	O
outside	O
of	O
its	O
virtual	B-General_Concept
address	I-General_Concept
space	I-General_Concept
,	O
the	O
kernel	B-Operating_System
would	O
notify	O
the	O
process	B-Operating_System
of	O
this	O
violation	O
via	O
a	O
SIGSEGV	B-Error_Name
(	O
segmentation	B-Error_Name
violation	I-Error_Name
signal	O
)	O
.	O
</s>
<s>
The	O
exact	O
mapping	O
between	O
signal	O
names	O
and	O
exceptions	B-General_Concept
is	O
obviously	O
dependent	O
upon	O
the	O
CPU	B-General_Concept
,	O
since	O
exception	B-General_Concept
types	O
differ	O
between	O
architectures	O
.	O
</s>
<s>
The	O
list	O
below	O
documents	O
the	O
signals	O
specified	O
in	O
the	O
Single	O
Unix	B-Application
Specification	O
.	O
</s>
<s>
All	O
signals	O
are	O
defined	O
as	O
macro	O
constants	O
in	O
the	O
<signal.h>	O
header	O
file	O
.	O
</s>
<s>
The	O
SIGABRT	O
and	O
SIGIOT	O
signal	O
is	O
sent	O
to	O
a	O
process	B-Operating_System
to	O
tell	O
it	O
to	O
abort	B-General_Concept
,	O
i.e.	O
</s>
<s>
to	O
terminate	B-Operating_System
.	O
</s>
<s>
The	O
signal	O
is	O
usually	O
initiated	O
by	O
the	O
process	B-Operating_System
itself	O
when	O
it	O
calls	O
abort( )	O
function	O
of	O
the	B-Language
C	I-Language
Standard	I-Language
Library	I-Language
,	O
but	O
it	O
can	O
be	O
sent	O
to	O
the	O
process	B-Operating_System
from	O
outside	O
like	O
any	O
other	O
signal	O
.	O
</s>
<s>
The	O
SIGALRM	O
,	O
SIGVTALRM	O
and	O
SIGPROF	O
signal	O
is	O
sent	O
to	O
a	O
process	B-Operating_System
when	O
the	O
time	O
limit	O
specified	O
in	O
a	O
call	O
to	O
a	O
preceding	O
alarm	O
setting	O
function	O
(	O
such	O
as	O
setitimer	O
)	O
elapses	O
.	O
</s>
<s>
SIGVTALRM	O
is	O
sent	O
when	O
CPU	B-General_Concept
time	O
used	O
by	O
the	O
process	B-Operating_System
elapses	O
.	O
</s>
<s>
SIGPROF	O
is	O
sent	O
when	O
CPU	B-General_Concept
time	O
used	O
by	O
the	O
process	B-Operating_System
and	O
by	O
the	O
system	O
on	O
behalf	O
of	O
the	O
process	B-Operating_System
elapses	O
,	O
i.e.	O
</s>
<s>
The	O
SIGBUS	B-General_Concept
signal	O
is	O
sent	O
to	O
a	O
process	B-Operating_System
when	O
it	O
causes	O
a	O
bus	B-General_Concept
error	I-General_Concept
.	O
</s>
<s>
The	O
SIGCHLD	B-Operating_System
signal	O
is	O
sent	O
to	O
a	O
process	B-Operating_System
when	O
a	O
child	B-Operating_System
process	I-Operating_System
terminates	B-Operating_System
,	O
is	O
interrupted	O
,	O
or	O
resumes	O
after	O
being	O
interrupted	O
.	O
</s>
<s>
One	O
common	O
usage	O
of	O
the	O
signal	O
is	O
to	O
instruct	O
the	O
operating	O
system	O
to	O
clean	O
up	O
the	O
resources	O
used	O
by	O
a	O
child	B-Operating_System
process	I-Operating_System
after	O
its	O
termination	O
without	O
an	O
explicit	O
call	O
to	O
the	O
wait	B-Operating_System
system	B-Operating_System
call	I-Operating_System
.	O
</s>
<s>
The	O
SIGCONT	B-General_Concept
signal	O
instructs	O
the	O
operating	O
system	O
to	O
continue	O
(	O
restart	O
)	O
a	O
process	B-Operating_System
previously	O
paused	O
by	O
the	O
SIGSTOP	B-General_Concept
or	O
SIGTSTP	B-General_Concept
signal	O
.	O
</s>
<s>
One	O
important	O
use	O
of	O
this	O
signal	O
is	O
in	O
job	B-Operating_System
control	I-Operating_System
in	O
the	O
Unix	B-Application
shell	I-Application
.	O
</s>
<s>
The	O
SIGFPE	B-General_Concept
signal	O
is	O
sent	O
to	O
a	O
process	B-Operating_System
when	O
an	O
exceptional	O
(	O
but	O
not	O
necessarily	O
erroneous	O
)	O
condition	O
has	O
been	O
detected	O
in	O
the	O
floating	B-Algorithm
point	I-Algorithm
or	O
integer	O
arithmetic	O
hardware	O
.	O
</s>
<s>
This	O
may	O
include	O
division	B-Algorithm
by	I-Algorithm
zero	I-Algorithm
,	O
floating	B-Algorithm
point	I-Algorithm
underflow	O
or	O
overflow	O
,	O
integer	B-Error_Name
overflow	I-Error_Name
,	O
an	O
invalid	O
operation	O
or	O
an	O
inexact	O
computation	O
.	O
</s>
<s>
The	O
SIGHUP	B-General_Concept
signal	O
is	O
sent	O
to	O
a	O
process	B-Operating_System
when	O
its	O
controlling	B-General_Concept
terminal	I-General_Concept
is	O
closed	O
.	O
</s>
<s>
It	O
was	O
originally	O
designed	O
to	O
notify	O
the	O
process	B-Operating_System
of	O
a	O
serial	O
line	O
drop	O
(	O
a	O
hangup	O
)	O
.	O
</s>
<s>
In	O
modern	O
systems	O
,	O
this	O
signal	O
usually	O
means	O
that	O
the	O
controlling	O
pseudo	B-Application
or	I-Application
virtual	I-Application
terminal	I-Application
has	O
been	O
closed	O
.	O
</s>
<s>
Many	O
daemons	B-Operating_System
(	O
who	O
have	O
no	O
controlling	B-General_Concept
terminal	I-General_Concept
)	O
interpret	O
receipt	O
of	O
this	O
signal	O
as	O
a	O
request	O
to	O
reload	O
their	O
configuration	O
files	O
and	O
flush/reopen	O
their	O
logfiles	O
instead	O
of	O
exiting	O
.	O
</s>
<s>
nohup	B-Device
is	O
a	O
command	O
to	O
make	O
a	O
command	O
ignore	O
the	O
signal	O
.	O
</s>
<s>
The	O
SIGILL	O
signal	O
is	O
sent	O
to	O
a	O
process	B-Operating_System
when	O
it	O
attempts	O
to	O
execute	O
an	O
illegal	O
,	O
malformed	O
,	O
unknown	O
,	O
or	O
privileged	O
instruction	O
.	O
</s>
<s>
The	O
SIGINT	O
signal	O
is	O
sent	O
to	O
a	O
process	B-Operating_System
by	O
its	O
controlling	B-General_Concept
terminal	I-General_Concept
when	O
a	O
user	O
wishes	O
to	O
interrupt	B-Application
the	O
process	B-Operating_System
.	O
</s>
<s>
This	O
is	O
typically	O
initiated	O
by	O
pressing	O
,	O
but	O
on	O
some	O
systems	O
,	O
the	O
"	O
delete	B-Device
"	O
character	O
or	O
"	O
break	B-Device
"	O
key	O
can	O
be	O
used	O
.	O
</s>
<s>
The	O
SIGKILL	O
signal	O
is	O
sent	O
to	O
a	O
process	B-Operating_System
to	O
cause	O
it	O
to	O
terminate	B-Operating_System
immediately	O
(	O
kill	B-Operating_System
)	O
.	O
</s>
<s>
In	O
contrast	O
to	O
SIGTERM	O
and	O
SIGINT	O
,	O
this	O
signal	O
cannot	O
be	O
caught	O
or	O
ignored	O
,	O
and	O
the	O
receiving	O
process	B-Operating_System
cannot	O
perform	O
any	O
clean-up	O
upon	O
receiving	O
this	O
signal	O
.	O
</s>
<s>
The	O
following	O
exceptions	B-General_Concept
apply	O
:	O
</s>
<s>
Zombie	B-Operating_System
processes	I-Operating_System
cannot	O
be	O
killed	O
since	O
they	O
are	O
already	O
dead	O
and	O
waiting	O
for	O
their	O
parent	O
processes	O
to	O
reap	B-Operating_System
them	O
.	O
</s>
<s>
The	O
init	B-Operating_System
process	B-Operating_System
is	O
special	O
:	O
It	O
does	O
not	O
get	O
signals	O
that	O
it	O
does	O
not	O
want	O
to	O
handle	O
,	O
and	O
thus	O
it	O
can	O
ignore	O
SIGKILL	O
.	O
</s>
<s>
An	O
exception	B-General_Concept
from	O
this	O
rule	O
is	O
while	O
init	B-Operating_System
is	O
ptraced	O
on	O
Linux	B-Application
.	O
</s>
<s>
An	O
uninterruptibly	O
sleeping	O
process	B-Operating_System
may	O
not	O
terminate	B-Operating_System
(	O
and	O
free	O
its	O
resources	O
)	O
even	O
when	O
sent	O
SIGKILL	O
.	O
</s>
<s>
This	O
is	O
one	O
of	O
the	O
few	O
cases	O
in	O
which	O
a	O
UNIX	B-Application
system	I-Application
may	O
have	O
to	O
be	O
rebooted	O
to	O
solve	O
a	O
temporary	O
software	O
problem	O
.	O
</s>
<s>
SIGKILL	O
is	O
used	O
as	O
a	O
last	O
resort	O
when	O
terminating	O
processes	O
in	O
most	O
system	O
shutdown	B-Device
procedures	O
if	O
it	O
does	O
not	O
voluntarily	O
exit	O
in	O
response	O
to	O
SIGTERM	O
.	O
</s>
<s>
To	O
speed	O
the	O
computer	O
shutdown	B-Device
procedure	O
,	O
Mac	B-Device
OS	I-Device
X	I-Device
10.6	I-Device
,	O
aka	O
Snow	B-Device
Leopard	I-Device
,	O
will	O
send	O
SIGKILL	O
to	O
applications	O
that	O
have	O
marked	O
themselves	O
"	O
clean	O
"	O
resulting	O
in	O
faster	O
shutdown	B-Device
times	O
with	O
,	O
presumably	O
,	O
no	O
ill	O
effects	O
.	O
</s>
<s>
in	O
Linux	B-Application
;	O
it	O
does	O
n't	O
let	O
programs	O
save	O
unsaved	O
data	O
.	O
</s>
<s>
The	O
SIGPIPE	O
signal	O
is	O
sent	O
to	O
a	O
process	B-Operating_System
when	O
it	O
attempts	O
to	O
write	O
to	O
a	O
pipe	B-Operating_System
without	O
a	O
process	B-Operating_System
connected	O
to	O
the	O
other	O
end	O
.	O
</s>
<s>
Using	O
it	O
effectively	O
leads	O
to	O
making	O
asynchronous	B-Architecture
I/O	I-Architecture
requests	O
since	O
the	O
kernel	B-Operating_System
will	O
poll	O
the	O
descriptor	O
in	O
place	O
of	O
the	O
caller	O
.	O
</s>
<s>
It	O
provides	O
an	O
alternative	O
to	O
active	O
polling	B-General_Concept
.	O
</s>
<s>
The	O
SIGQUIT	O
signal	O
is	O
sent	O
to	O
a	O
process	B-Operating_System
by	O
its	O
controlling	B-General_Concept
terminal	I-General_Concept
when	O
the	O
user	O
requests	O
that	O
the	O
process	B-Operating_System
quit	O
and	O
perform	O
a	O
core	B-Error_Name
dump	I-Error_Name
.	O
</s>
<s>
The	O
SIGSEGV	B-Error_Name
signal	O
is	O
sent	O
to	O
a	O
process	B-Operating_System
when	O
it	O
makes	O
an	O
invalid	O
virtual	O
memory	O
reference	O
,	O
or	O
segmentation	B-Error_Name
fault	I-Error_Name
,	O
i.e.	O
</s>
<s>
when	O
it	O
performs	O
a	O
segmentation	B-Error_Name
violation	I-Error_Name
.	O
</s>
<s>
The	O
SIGSTOP	B-General_Concept
signal	O
instructs	O
the	O
operating	O
system	O
to	O
stop	O
a	O
process	B-Operating_System
for	O
later	O
resumption	O
.	O
</s>
<s>
The	O
SIGSYS	O
signal	O
is	O
sent	O
to	O
a	O
process	B-Operating_System
when	O
it	O
passes	O
a	O
bad	O
argument	O
to	O
a	O
system	B-Operating_System
call	I-Operating_System
.	O
</s>
<s>
libc	B-Language
)	O
to	O
make	O
the	O
call	O
for	O
them	O
.	O
</s>
<s>
SIGSYS	O
can	O
be	O
received	O
by	O
applications	O
violating	O
the	O
Linux	B-Application
Seccomp	B-Application
security	O
rules	O
configured	O
to	O
restrict	O
them	O
.	O
</s>
<s>
SIGSYS	O
can	O
also	O
be	O
used	O
to	O
emulate	O
foreign	O
system	B-Operating_System
calls	I-Operating_System
,	O
e.g.	O
</s>
<s>
emulate	O
Windows	O
system	B-Operating_System
calls	I-Operating_System
on	O
Linux	B-Application
.	O
</s>
<s>
The	O
SIGTERM	O
signal	O
is	O
sent	O
to	O
a	O
process	B-Operating_System
to	O
request	O
its	O
termination	O
.	O
</s>
<s>
Unlike	O
the	O
SIGKILL	O
signal	O
,	O
it	O
can	O
be	O
caught	O
and	O
interpreted	O
or	O
ignored	O
by	O
the	O
process	B-Operating_System
.	O
</s>
<s>
This	O
allows	O
the	O
process	B-Operating_System
to	O
perform	O
nice	O
termination	O
releasing	O
resources	O
and	O
saving	O
state	O
if	O
appropriate	O
.	O
</s>
<s>
The	O
SIGTSTP	B-General_Concept
signal	O
is	O
sent	O
to	O
a	O
process	B-Operating_System
by	O
its	O
controlling	B-General_Concept
terminal	I-General_Concept
to	O
request	O
it	O
to	O
stop	O
(	O
terminal	O
stop	O
)	O
.	O
</s>
<s>
Unlike	O
SIGSTOP	B-General_Concept
,	O
the	O
process	B-Operating_System
can	O
register	O
a	O
signal	O
handler	O
for	O
,	O
or	O
ignore	O
,	O
the	O
signal	O
.	O
</s>
<s>
The	O
SIGTTIN	B-General_Concept
and	O
SIGTTOU	B-General_Concept
signals	O
are	O
sent	O
to	O
a	O
process	B-Operating_System
when	O
it	O
attempts	O
to	O
read	O
in	O
or	O
write	O
out	O
respectively	O
from	O
the	O
tty	O
while	O
in	O
the	O
background	B-Operating_System
.	O
</s>
<s>
Typically	O
,	O
these	O
signals	O
are	O
received	O
only	O
by	O
processes	O
under	O
job	B-Operating_System
control	I-Operating_System
;	O
daemons	B-Operating_System
do	O
not	O
have	O
controlling	O
terminals	O
and	O
,	O
therefore	O
,	O
should	O
never	O
receive	O
these	O
signals	O
.	O
</s>
<s>
The	O
SIGTRAP	O
signal	O
is	O
sent	O
to	O
a	O
process	B-Operating_System
when	O
an	O
exception	B-General_Concept
(	O
or	O
trap	B-Application
)	O
occurs	O
:	O
a	O
condition	O
that	O
a	O
debugger	B-Application
has	O
requested	O
to	O
be	O
informed	O
of	O
for	O
example	O
,	O
when	O
a	O
particular	O
function	O
is	O
executed	O
,	O
or	O
when	O
a	O
particular	O
variable	O
changes	O
value	O
.	O
</s>
<s>
The	O
SIGURG	B-Protocol
signal	O
is	O
sent	O
to	O
a	O
process	B-Operating_System
when	O
a	O
socket	B-Protocol
has	O
urgent	O
or	O
out-of-band	B-Protocol
data	I-Protocol
available	O
to	O
read	O
.	O
</s>
<s>
The	O
SIGUSR1	O
and	O
SIGUSR2	O
signals	O
are	O
sent	O
to	O
a	O
process	B-Operating_System
to	O
indicate	O
user-defined	O
conditions	O
.	O
</s>
<s>
The	O
SIGXCPU	O
signal	O
is	O
sent	O
to	O
a	O
process	B-Operating_System
when	O
it	O
has	O
used	O
up	O
the	O
CPU	B-General_Concept
for	O
a	O
duration	O
that	O
exceeds	O
a	O
certain	O
predetermined	O
user-settable	O
value	O
.	O
</s>
<s>
The	O
arrival	O
of	O
a	O
SIGXCPU	O
signal	O
provides	O
the	O
receiving	O
process	B-Operating_System
a	O
chance	O
to	O
quickly	O
save	O
any	O
intermediate	O
results	O
and	O
to	O
exit	O
gracefully	O
,	O
before	O
it	O
is	O
terminated	O
by	O
the	O
operating	O
system	O
using	O
the	O
SIGKILL	O
signal	O
.	O
</s>
<s>
The	O
SIGXFSZ	O
signal	O
is	O
sent	O
to	O
a	O
process	B-Operating_System
when	O
it	O
grows	O
a	O
file	O
that	O
exceeds	O
the	O
maximum	O
allowed	O
size	O
.	O
</s>
<s>
The	O
SIGWINCH	O
signal	O
is	O
sent	O
to	O
a	O
process	B-Operating_System
when	O
its	O
controlling	B-General_Concept
terminal	I-General_Concept
changes	O
its	O
size	O
(	O
a	O
window	O
change	O
)	O
.	O
</s>
<s>
A	O
process	B-Operating_System
can	O
define	O
how	B-Language
to	I-Language
handle	I-Language
incoming	I-Language
POSIX	I-Language
signals	I-Language
.	O
</s>
<s>
If	O
a	O
process	B-Operating_System
does	O
not	O
define	O
a	O
behaviour	O
for	O
a	O
signal	O
,	O
then	O
the	O
default	O
handler	O
for	O
that	O
signal	O
is	O
being	O
used	O
.	O
</s>
<s>
The	O
table	O
below	O
lists	O
some	O
default	O
actions	O
for	O
POSIX-compliant	O
UNIX	B-Application
systems	I-Application
,	O
such	O
as	O
FreeBSD	B-Operating_System
,	O
OpenBSD	B-Operating_System
and	O
Linux	B-Application
.	O
</s>
<s>
Terminate	B-Operating_System
Abnormal	O
termination	O
of	O
the	O
process	B-Operating_System
.	O
</s>
<s>
The	O
process	B-Operating_System
is	O
terminated	O
with	O
all	O
the	O
consequences	O
of	O
_exit( )	O
except	O
that	O
the	O
status	O
made	O
available	O
to	O
wait( )	O
and	O
waitpid( )	O
indicates	O
abnormal	O
termination	O
by	O
the	O
specified	O
signal	O
.	O
</s>
<s>
Terminate	B-Operating_System
(	O
core	B-Error_Name
dump	I-Error_Name
)	O
Abnormal	O
termination	O
of	O
the	O
process	B-Operating_System
.	O
</s>
<s>
Additionally	O
,	O
implementation-defined	O
abnormal	O
termination	O
actions	O
,	O
such	O
as	O
creation	O
of	O
a	O
core	B-Error_Name
file	I-Error_Name
,	O
may	O
occur	O
.	O
</s>
<s>
Stop	O
Stop	O
(	O
or	O
suspend	O
)	O
the	O
process	B-Operating_System
.	O
</s>
<s>
Continue	O
Continue	O
the	O
process	B-Operating_System
,	O
if	O
it	O
is	O
stopped	O
;	O
otherwise	O
,	O
ignore	O
the	O
signal	O
.	O
</s>
<s>
The	O
SIGEMT	O
signal	O
is	O
sent	O
to	O
a	O
process	B-Operating_System
when	O
an	O
emulator	B-Application
trap	B-Application
occurs	O
.	O
</s>
<s>
The	O
SIGINFO	O
signal	O
is	O
sent	O
to	O
a	O
process	B-Operating_System
when	O
a	O
status	O
(	O
info	O
)	O
request	O
is	O
received	O
from	O
the	O
controlling	B-General_Concept
terminal	I-General_Concept
.	O
</s>
<s>
The	O
SIGPWR	O
signal	O
is	O
sent	O
to	O
a	O
process	B-Operating_System
when	O
the	O
system	O
experiences	O
a	O
power	O
failure	O
.	O
</s>
<s>
The	O
SIGLOST	O
signal	O
is	O
sent	O
to	O
a	O
process	B-Operating_System
when	O
a	O
file	O
lock	O
is	O
lost	O
.	O
</s>
<s>
The	O
SIGSTKFLT	O
signal	O
is	O
sent	O
to	O
a	O
process	B-Operating_System
when	O
the	O
coprocessor	O
experiences	O
a	O
stack	O
fault	O
(	O
i.e.	O
</s>
<s>
It	O
is	O
defined	O
by	O
,	O
but	O
not	O
used	O
on	O
Linux	B-Application
,	O
where	O
a	O
x87	B-Application
coprocessor	O
stack	O
fault	O
will	O
generate	O
SIGFPE	B-General_Concept
instead	O
.	O
</s>
<s>
The	O
SIGUNUSED	O
signal	O
is	O
sent	O
to	O
a	O
process	B-Operating_System
when	O
a	O
system	B-Operating_System
call	I-Operating_System
with	O
an	O
unused	O
system	B-Operating_System
call	I-Operating_System
number	O
is	O
made	O
.	O
</s>
<s>
The	O
SIGCLD	B-Operating_System
signal	O
is	O
synonymous	O
with	O
SIGCHLD	B-Operating_System
.	O
</s>
