OSDN Git Service

7f0e2589a04da64e8904778a3e362a41ba12d3e4
[linuxjm/LDP_man-pages.git] / original / man2 / sigaction.2
1 '\" t
2 .\" Copyright (c) 1994,1995 Mike Battersby <mib@deakin.edu.au>
3 .\" and Copyright 2004, 2005 Michael Kerrisk <mtk.manpages@gmail.com>
4 .\" based on work by faith@cs.unc.edu
5 .\"
6 .\" %%%LICENSE_START(VERBATIM)
7 .\" Permission is granted to make and distribute verbatim copies of this
8 .\" manual provided the copyright notice and this permission notice are
9 .\" preserved on all copies.
10 .\"
11 .\" Permission is granted to copy and distribute modified versions of this
12 .\" manual under the conditions for verbatim copying, provided that the
13 .\" entire resulting derived work is distributed under the terms of a
14 .\" permission notice identical to this one.
15 .\"
16 .\" Since the Linux kernel and libraries are constantly changing, this
17 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
18 .\" responsibility for errors or omissions, or for damages resulting from
19 .\" the use of the information contained herein.  The author(s) may not
20 .\" have taken the same level of care in the production of this manual,
21 .\" which is licensed free of charge, as they might when working
22 .\" professionally.
23 .\"
24 .\" Formatted or processed versions of this manual, if unaccompanied by
25 .\" the source, must acknowledge the copyright and authors of this work.
26 .\" %%%LICENSE_END
27 .\"
28 .\" Modified, aeb, 960424
29 .\" Modified Fri Jan 31 17:31:20 1997 by Eric S. Raymond <esr@thyrsus.com>
30 .\" Modified Thu Nov 26 02:12:45 1998 by aeb - add SIGCHLD stuff.
31 .\" Modified Sat May  8 17:40:19 1999 by Matthew Wilcox
32 .\"     add POSIX.1b signals
33 .\" Modified Sat Dec 29 01:44:52 2001 by Evan Jones <ejones@uwaterloo.ca>
34 .\"     SA_ONSTACK
35 .\" Modified 2004-11-11 by Michael Kerrisk <mtk.manpages@gmail.com>
36 .\"     Added mention of SIGCONT under SA_NOCLDSTOP
37 .\"     Added SA_NOCLDWAIT
38 .\" Modified 2004-11-17 by Michael Kerrisk <mtk.manpages@gmail.com>
39 .\"     Updated discussion for POSIX.1-2001 and SIGCHLD and sa_flags.
40 .\"     Formatting fixes
41 .\" 2004-12-09, mtk, added SI_TKILL + other minor changes
42 .\" 2005-09-15, mtk, split sigpending(), sigprocmask(), sigsuspend()
43 .\"     out of this page into separate pages.
44 .\" 2010-06-11 Andi Kleen, add hwpoison signal extensions
45 .\" 2010-06-11 mtk, improvements to discussion of various siginfo_t fields.
46 .\"
47 .TH SIGACTION 2 2014-04-27 "Linux" "Linux Programmer's Manual"
48 .SH NAME
49 sigaction \- examine and change a signal action
50 .SH SYNOPSIS
51 .nf
52 .B #include <signal.h>
53 .sp
54 .BI "int sigaction(int " signum ", const struct sigaction *" act ,
55 .BI "              struct sigaction *" oldact );
56 .fi
57 .sp
58 .in -4n
59 Feature Test Macro Requirements for glibc (see
60 .BR feature_test_macros (7)):
61 .in
62 .sp
63 .ad l
64 .BR sigaction ():
65 _POSIX_C_SOURCE\ >=\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE
66
67 .IR siginfo_t :
68 _POSIX_C_SOURCE >= 199309L
69 .ad b
70 .SH DESCRIPTION
71 The
72 .BR sigaction ()
73 system call is used to change the action taken by a process on
74 receipt of a specific signal.
75 (See
76 .BR signal (7)
77 for an overview of signals.)
78 .PP
79 .I signum
80 specifies the signal and can be any valid signal except
81 .B SIGKILL
82 and
83 .BR SIGSTOP .
84 .PP
85 If
86 .I act
87 is non-NULL, the new action for signal
88 .I signum
89 is installed from
90 .IR act .
91 If
92 .I oldact
93 is non-NULL, the previous action is saved in
94 .IR oldact .
95 .PP
96 The
97 .I sigaction
98 structure is defined as something like:
99 .sp
100 .in +4n
101 .nf
102 struct sigaction {
103     void     (*sa_handler)(int);
104     void     (*sa_sigaction)(int, siginfo_t *, void *);
105     sigset_t   sa_mask;
106     int        sa_flags;
107     void     (*sa_restorer)(void);
108 };
109 .fi
110 .in
111 .PP
112 On some architectures a union is involved: do not assign to both
113 .I sa_handler
114 and
115 .IR sa_sigaction .
116 .PP
117 The
118 .I sa_restorer
119 element is obsolete and should not be used.
120 POSIX does not specify a
121 .I sa_restorer
122 element.
123 .PP
124 .I sa_handler
125 specifies the action to be associated with
126 .I signum
127 and may be
128 .B SIG_DFL
129 for the default action,
130 .B SIG_IGN
131 to ignore this signal, or a pointer to a signal handling function.
132 This function receives the signal number as its only argument.
133 .PP
134 If
135 .B SA_SIGINFO
136 is specified in
137 .IR sa_flags ,
138 then
139 .I sa_sigaction
140 (instead of
141 .IR sa_handler )
142 specifies the signal-handling function for
143 .IR signum .
144 This function receives the signal number as its first argument, a
145 pointer to a
146 .I siginfo_t
147 as its second argument and a pointer to a
148 .I ucontext_t
149 (cast to \fIvoid\ *\fP) as its third argument.
150 (Commonly, the handler function doesn't make any use of the third argument.
151 See
152 .BR getcontext (3)
153 for further information about
154 .IR ucontext_t .)
155 .PP
156 .I sa_mask
157 specifies a mask of signals which should be blocked
158 (i.e., added to the signal mask of the thread in which
159 the signal handler is invoked)
160 during execution of the signal handler.
161 In addition, the signal which triggered the handler
162 will be blocked, unless the
163 .B SA_NODEFER
164 flag is used.
165 .PP
166 .I sa_flags
167 specifies a set of flags which modify the behavior of the signal.
168 It is formed by the bitwise OR of zero or more of the following:
169 .RS 4
170 .TP
171 .B SA_NOCLDSTOP
172 If
173 .I signum
174 is
175 .BR SIGCHLD ,
176 do not receive notification when child processes stop (i.e., when they
177 receive one of
178 .BR SIGSTOP ", " SIGTSTP ", " SIGTTIN ", "
179 or
180 .BR SIGTTOU )
181 or resume (i.e., they receive
182 .BR SIGCONT )
183 (see
184 .BR wait (2)).
185 This flag is meaningful only when establishing a handler for
186 .BR SIGCHLD .
187 .TP
188 .BR SA_NOCLDWAIT " (since Linux 2.6)"
189 .\" To be precise: Linux 2.5.60 -- MTK
190 If
191 .I signum
192 is
193 .BR SIGCHLD ,
194 do not transform children into zombies when they terminate.
195 See also
196 .BR waitpid (2).
197 This flag is meaningful only when establishing a handler for
198 .BR SIGCHLD ,
199 or when setting that signal's disposition to
200 .BR SIG_DFL .
201
202 If the
203 .B SA_NOCLDWAIT
204 flag is set when establishing a handler for
205 .BR SIGCHLD ,
206 POSIX.1 leaves it unspecified whether a
207 .B SIGCHLD
208 signal is generated when a child process terminates.
209 On Linux, a
210 .B SIGCHLD
211 signal is generated in this case;
212 on some other implementations, it is not.
213 .TP
214 .B SA_NODEFER
215 Do not prevent the signal from being received from within its own signal
216 handler.
217 This flag is meaningful only when establishing a signal handler.
218 .B SA_NOMASK
219 is an obsolete, nonstandard synonym for this flag.
220 .TP
221 .B SA_ONSTACK
222 Call the signal handler on an alternate signal stack provided by
223 .BR sigaltstack (2).
224 If an alternate stack is not available, the default stack will be used.
225 This flag is meaningful only when establishing a signal handler.
226 .TP
227 .BR SA_RESETHAND
228 Restore the signal action to the default upon entry to the signal handler.
229 This flag is meaningful only when establishing a signal handler.
230 .B SA_ONESHOT
231 is an obsolete, nonstandard synonym for this flag.
232 .TP
233 .B SA_RESTART
234 Provide behavior compatible with BSD signal semantics by making certain
235 system calls restartable across signals.
236 This flag is meaningful only when establishing a signal handler.
237 See
238 .BR signal (7)
239 for a discussion of system call restarting.
240 .TP
241 .BR SA_SIGINFO " (since Linux 2.2)"
242 The signal handler takes three arguments, not one.
243 In this case,
244 .I sa_sigaction
245 should be set instead of
246 .IR sa_handler .
247 This flag is meaningful only when establishing a signal handler.
248 .\" (The
249 .\" .I sa_sigaction
250 .\" field was added in Linux 2.1.86.)
251 .RE
252 .PP
253 The
254 .I siginfo_t
255 argument to
256 .I sa_sigaction
257 is a struct with the following elements:
258 .sp
259 .in +4n
260 .nf
261 siginfo_t {
262     int      si_signo;    /* Signal number */
263     int      si_errno;    /* An errno value */
264     int      si_code;     /* Signal code */
265     int      si_trapno;   /* Trap number that caused
266                              hardware-generated signal
267                              (unused on most architectures) */
268 .\" FIXME
269 .\" si_trapno seems to be only used on SPARC and Alpha;
270 .\" this page could use a little more detail on its purpose there.
271     pid_t    si_pid;      /* Sending process ID */
272     uid_t    si_uid;      /* Real user ID of sending process */
273     int      si_status;   /* Exit value or signal */
274     clock_t  si_utime;    /* User time consumed */
275     clock_t  si_stime;    /* System time consumed */
276     sigval_t si_value;    /* Signal value */
277     int      si_int;      /* POSIX.1b signal */
278     void    *si_ptr;      /* POSIX.1b signal */
279     int      si_overrun;  /* Timer overrun count; POSIX.1b timers */
280     int      si_timerid;  /* Timer ID; POSIX.1b timers */
281 .\" In the kernel: si_tid
282     void    *si_addr;     /* Memory location which caused fault */
283     long     si_band;     /* Band event (was \fIint\fP in
284                              glibc 2.3.2 and earlier) */
285     int      si_fd;       /* File descriptor */
286     short    si_addr_lsb; /* Least significant bit of address
287                              (since Linux 2.6.32) */
288 }
289 .fi
290 .in
291
292 .IR si_signo ", " si_errno " and " si_code
293 are defined for all signals.
294 .RI ( si_errno
295 is generally unused on Linux.)
296 The rest of the struct may be a union, so that one should
297 read only the fields that are meaningful for the given signal:
298 .IP * 2
299 Signals sent with
300 .BR kill (2)
301 and
302 .BR sigqueue (3)
303 fill in
304 .IR si_pid " and " si_uid .
305 In addition, signals sent with
306 .BR sigqueue (3)
307 fill in
308 .IR si_int " and " si_ptr
309 with the values specified by the sender of the signal;
310 see
311 .BR sigqueue (3)
312 for more details.
313 .IP *
314 Signals sent by POSIX.1b timers (since Linux 2.6) fill in
315 .I si_overrun
316 and
317 .IR si_timerid .
318 The
319 .I si_timerid
320 field is an internal ID used by the kernel to identify
321 the timer; it is not the same as the timer ID returned by
322 .BR timer_create (2).
323 The
324 .I si_overrun
325 field is the timer overrun count;
326 this is the same information as is obtained by a call to
327 .BR timer_getoverrun (2).
328 These fields are nonstandard Linux extensions.
329 .IP *
330 Signals sent for message queue notification (see the description of
331 .B SIGEV_SIGNAL
332 in
333 .BR mq_notify (3))
334 fill in
335 .IR si_int / si_ptr ,
336 with the
337 .I sigev_value
338 supplied to
339 .BR mq_notify (3);
340 .IR si_pid ,
341 with the process ID of the message sender; and
342 .IR si_uid ,
343 with the real user ID of the message sender.
344 .IP *
345 .B SIGCHLD
346 fills in
347 .IR si_pid ", " si_uid ", " si_status ", " si_utime ", and " si_stime ,
348 providing information about the child.
349 The
350 .I si_pid
351 field is the process ID of the child;
352 .I si_uid
353 is the child's real user ID.
354 The
355 .I si_status
356 field contains the exit status of the child (if
357 .I si_code
358 is
359 .BR CLD_EXITED ),
360 or the signal number that caused the process to change state.
361 The
362 .I si_utime
363 and
364 .I si_stime
365 contain the user and system CPU time used by the child process;
366 these fields do not include the times used by waited-for children (unlike
367 .BR getrusage (2)
368 and
369 .BR times (2)).
370 In kernels up to 2.6, and since 2.6.27, these fields report
371 CPU time in units of
372 .IR sysconf(_SC_CLK_TCK) .
373 In 2.6 kernels before 2.6.27,
374 a bug meant that these fields reported time in units
375 of the (configurable) system jiffy (see
376 .BR time (7)).
377 .\" FIXME .
378 .\" When si_utime and si_stime where originally implemented, the
379 .\" measurement unit was HZ, which was the same as clock ticks
380 .\" (sysconf(_SC_CLK_TCK)).  In 2.6, HZ became configurable, and
381 .\" was *still* used as the unit to return the info these fields,
382 .\" with the result that the field values depended on the the
383 .\" configured HZ.  Of course, the should have been measured in
384 .\" USER_HZ instead, so that sysconf(_SC_CLK_TCK) could be used to
385 .\" convert to seconds.  I have a queued patch to fix this:
386 .\" http://thread.gmane.org/gmane.linux.kernel/698061/ .
387 .\" This patch made it into 2.6.27.
388 .\" But note that these fields still don't return the times of
389 .\" waited-for children (as is done by getrusage() and times()
390 .\" and wait4()).  Solaris 8 does include child times.
391 .IP *
392 .BR SIGILL ,
393 .BR SIGFPE ,
394 .BR SIGSEGV ,
395 .BR SIGBUS ,
396 and
397 .BR SIGTRAP
398 fill in
399 .I si_addr
400 with the address of the fault.
401 .\" FIXME SIGTRAP also sets the following for ptrace_notify() ?
402 .\"     info.si_code = exit_code;
403 .\"     info.si_pid = task_pid_vnr(current);
404 .\"     info.si_uid = current_uid();  /* Real UID */
405 On some architectures,
406 these signals also fill in the
407 .I si_trapno
408 field.
409 Some suberrors of
410 .BR SIGBUS ,
411 in particular
412 .B BUS_MCEERR_AO
413 and
414 .BR BUS_MCEERR_AR ,
415 also fill in
416 .IR si_addr_lsb .
417 This field indicates the least significant bit of the reported address
418 and therefore the extent of the corruption.
419 For example, if a full page was corrupted,
420 .I si_addr_lsb
421 contains
422 .IR log2(sysconf(_SC_PAGESIZE)) .
423 .B BUS_MCERR_*
424 and
425 .I si_addr_lsb
426 are Linux-specific extensions.
427 .IP *
428 .BR SIGIO / SIGPOLL
429 (the two names are synonyms on Linux)
430 fills in
431 .IR si_band " and " si_fd .
432 The
433 .I si_band
434 event is a bit mask containing the same values as are filled in the
435 .I revents
436 field by
437 .BR poll (2).
438 The
439 .I si_fd
440 field indicates the file descriptor for which the I/O event occurred.
441 .PP
442 .I si_code
443 is a value (not a bit mask)
444 indicating why this signal was sent.
445 The following list shows the values which can be placed in
446 .I si_code
447 for any signal, along with reason that the signal was generated.
448 .RS 4
449 .TP 15
450 .B SI_USER
451 .BR kill (2)
452 .TP
453 .B SI_KERNEL
454 Sent by the kernel.
455 .TP
456 .B SI_QUEUE
457 .BR sigqueue (3)
458 .TP
459 .B SI_TIMER
460 POSIX timer expired
461 .TP
462 .B SI_MESGQ
463 POSIX message queue state changed (since Linux 2.6.6); see
464 .BR mq_notify (3)
465 .TP
466 .B SI_ASYNCIO
467 AIO completed
468 .TP
469 .B SI_SIGIO
470 Queued
471 .B SIGIO
472 (only in kernels up to Linux 2.2; from Linux 2.4 onward
473 .BR SIGIO / SIGPOLL
474 fills in
475 .I si_code
476 as described below).
477 .TP
478 .B SI_TKILL
479 .BR tkill (2)
480 or
481 .BR tgkill (2)
482 (since Linux 2.4.19)
483 .\" SI_DETHREAD is defined in 2.6.9 sources, but isn't implemented
484 .\" It appears to have been an idea that was tried during 2.5.6
485 .\" through to 2.5.24 and then was backed out.
486 .RE
487 .PP
488 The following values can be placed in
489 .I si_code
490 for a
491 .B SIGILL
492 signal:
493 .RS 4
494 .TP 15
495 .B ILL_ILLOPC
496 illegal opcode
497 .TP
498 .B ILL_ILLOPN
499 illegal operand
500 .TP
501 .B ILL_ILLADR
502 illegal addressing mode
503 .TP
504 .B ILL_ILLTRP
505 illegal trap
506 .TP
507 .B ILL_PRVOPC
508 privileged opcode
509 .TP
510 .B ILL_PRVREG
511 privileged register
512 .TP
513 .B ILL_COPROC
514 coprocessor error
515 .TP
516 .B ILL_BADSTK
517 internal stack error
518 .RE
519 .PP
520 The following values can be placed in
521 .I si_code
522 for a
523 .B SIGFPE
524 signal:
525 .RS 4
526 .TP 15
527 .B FPE_INTDIV
528 integer divide by zero
529 .TP
530 .B FPE_INTOVF
531 integer overflow
532 .TP
533 .B FPE_FLTDIV
534 floating-point divide by zero
535 .TP
536 .B FPE_FLTOVF
537 floating-point overflow
538 .TP
539 .B FPE_FLTUND
540 floating-point underflow
541 .TP
542 .B FPE_FLTRES
543 floating-point inexact result
544 .TP
545 .B FPE_FLTINV
546 floating-point invalid operation
547 .TP
548 .B FPE_FLTSUB
549 subscript out of range
550 .RE
551 .PP
552 The following values can be placed in
553 .I si_code
554 for a
555 .B SIGSEGV
556 signal:
557 .RS 4
558 .TP 15
559 .B SEGV_MAPERR
560 address not mapped to object
561 .TP
562 .B SEGV_ACCERR
563 invalid permissions for mapped object
564 .RE
565 .PP
566 The following values can be placed in
567 .I si_code
568 for a
569 .B SIGBUS
570 signal:
571 .RS 4
572 .TP 15
573 .B BUS_ADRALN
574 invalid address alignment
575 .TP
576 .B BUS_ADRERR
577 nonexistent physical address
578 .TP
579 .B BUS_OBJERR
580 object-specific hardware error
581 .TP
582 .BR BUS_MCEERR_AR " (since Linux 2.6.32)"
583 Hardware memory error consumed on a machine check; action required.
584 .TP
585 .BR BUS_MCEERR_AO " (since Linux 2.6.32)"
586 Hardware memory error detected in process but not consumed; action optional.
587 .RE
588 .PP
589 The following values can be placed in
590 .I si_code
591 for a
592 .B SIGTRAP
593 signal:
594 .RS 4
595 .TP 15
596 .B TRAP_BRKPT
597 process breakpoint
598 .TP
599 .B TRAP_TRACE
600 process trace trap
601 .TP
602 .BR TRAP_BRANCH " (since Linux 2.4)"
603 process taken branch trap
604 .TP
605 .BR TRAP_HWBKPT " (since Linux 2.4)"
606 hardware breakpoint/watchpoint
607 .RE
608 .PP
609 The following values can be placed in
610 .I si_code
611 for a
612 .B SIGCHLD
613 signal:
614 .RS 4
615 .TP 15
616 .B CLD_EXITED
617 child has exited
618 .TP
619 .B CLD_KILLED
620 child was killed
621 .TP
622 .B CLD_DUMPED
623 child terminated abnormally
624 .TP
625 .B CLD_TRAPPED
626 traced child has trapped
627 .TP
628 .B CLD_STOPPED
629 child has stopped
630 .TP
631 .B CLD_CONTINUED
632 stopped child has continued (since Linux 2.6.9)
633 .RE
634 .PP
635 The following values can be placed in
636 .I si_code
637 for a
638 .BR SIGIO / SIGPOLL
639 signal:
640 .RS 4
641 .TP 15
642 .B POLL_IN
643 data input available
644 .TP
645 .B POLL_OUT
646 output buffers available
647 .TP
648 .B POLL_MSG
649 input message available
650 .TP
651 .B POLL_ERR
652 I/O error
653 .TP
654 .B POLL_PRI
655 high priority input available
656 .TP
657 .B POLL_HUP
658 device disconnected
659 .RE
660 .SH RETURN VALUE
661 .BR sigaction ()
662 returns 0 on success; on error, \-1 is returned, and
663 .I errno
664 is set to indicate the error.
665 .SH ERRORS
666 .TP
667 .B EFAULT
668 .IR act " or " oldact
669 points to memory which is not a valid part of the process address space.
670 .TP
671 .B EINVAL
672 An invalid signal was specified.
673 This will also be generated if an attempt
674 is made to change the action for
675 .BR SIGKILL " or " SIGSTOP ", "
676 which cannot be caught or ignored.
677 .SH CONFORMING TO
678 POSIX.1-2001, SVr4.
679 .\" SVr4 does not document the EINTR condition.
680 .SH NOTES
681 A child created via
682 .BR fork (2)
683 inherits a copy of its parent's signal dispositions.
684 During an
685 .BR execve (2),
686 the dispositions of handled signals are reset to the default;
687 the dispositions of ignored signals are left unchanged.
688
689 According to POSIX, the behavior of a process is undefined after it
690 ignores a
691 .BR SIGFPE ,
692 .BR SIGILL ,
693 or
694 .B SIGSEGV
695 signal that was not generated by
696 .BR kill (2)
697 or
698 .BR raise (3).
699 Integer division by zero has undefined result.
700 On some architectures it will generate a
701 .B SIGFPE
702 signal.
703 (Also dividing the most negative integer by \-1 may generate
704 .BR SIGFPE .)
705 Ignoring this signal might lead to an endless loop.
706 .PP
707 POSIX.1-1990 disallowed setting the action for
708 .B SIGCHLD
709 to
710 .BR SIG_IGN .
711 POSIX.1-2001 allows this possibility, so that ignoring
712 .B SIGCHLD
713 can be used to prevent the creation of zombies (see
714 .BR wait (2)).
715 Nevertheless, the historical BSD and System\ V behaviors for ignoring
716 .B SIGCHLD
717 differ, so that the only completely portable method of ensuring that
718 terminated children do not become zombies is to catch the
719 .B SIGCHLD
720 signal and perform a
721 .BR wait (2)
722 or similar.
723 .PP
724 POSIX.1-1990 specified only
725 .BR SA_NOCLDSTOP .
726 POSIX.1-2001 added
727 .BR SA_NOCLDWAIT ,
728 .BR SA_RESETHAND ,
729 .BR SA_NODEFER ,
730 and
731 .BR SA_SIGINFO .
732 Use of these latter values in
733 .I sa_flags
734 may be less portable in applications intended for older
735 UNIX implementations.
736 .PP
737 The
738 .B SA_RESETHAND
739 flag is compatible with the SVr4 flag of the same name.
740 .PP
741 The
742 .B SA_NODEFER
743 flag is compatible with the SVr4 flag of the same name under kernels
744 1.3.9 and newer.
745 On older kernels the Linux implementation
746 allowed the receipt of any signal, not just the one we are installing
747 (effectively overriding any
748 .I sa_mask
749 settings).
750 .PP
751 .BR sigaction ()
752 can be called with a NULL second argument to query the current signal
753 handler.
754 It can also be used to check whether a given signal is valid for
755 the current machine by calling it with NULL second and third arguments.
756 .PP
757 It is not possible to block
758 .BR SIGKILL " or " SIGSTOP
759 (by specifying them in
760 .IR sa_mask ).
761 Attempts to do so are silently ignored.
762 .PP
763 See
764 .BR sigsetops (3)
765 for details on manipulating signal sets.
766 .PP
767 See
768 .BR signal (7)
769 for a list of the async-signal-safe functions that can be
770 safely called inside from inside a signal handler.
771 .SS Undocumented
772 Before the introduction of
773 .B SA_SIGINFO
774 it was also possible to get some additional information,
775 namely by using a
776 .I sa_handler
777 with second argument of type
778 .IR "struct sigcontext".
779 See the relevant Linux kernel sources for details.
780 This use is obsolete now.
781 .SH BUGS
782 In kernels up to and including 2.6.13, specifying
783 .B SA_NODEFER
784 in
785 .I sa_flags
786 prevents not only the delivered signal from being masked during
787 execution of the handler, but also the signals specified in
788 .IR sa_mask .
789 This bug was fixed in kernel 2.6.14.
790 .SH EXAMPLE
791 See
792 .BR mprotect (2).
793 .SH SEE ALSO
794 .BR kill (1),
795 .BR kill (2),
796 .BR killpg (2),
797 .BR pause (2),
798 .BR restart_syscall (2),
799 .BR sigaltstack (2),
800 .BR signal (2),
801 .BR signalfd (2),
802 .BR sigpending (2),
803 .BR sigprocmask (2),
804 .BR sigsuspend (2),
805 .BR wait (2),
806 .BR raise (3),
807 .BR siginterrupt (3),
808 .BR sigqueue (3),
809 .BR sigsetops (3),
810 .BR sigvec (3),
811 .BR core (5),
812 .BR signal (7)
813 .SH COLOPHON
814 This page is part of release 3.67 of the Linux
815 .I man-pages
816 project.
817 A description of the project,
818 information about reporting bugs,
819 and the latest version of this page,
820 can be found at
821 \%http://www.kernel.org/doc/man\-pages/.