]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/sysv_signal.3
Change mtk's email address
[thirdparty/man-pages.git] / man3 / sysv_signal.3
CommitLineData
c11b1abf 1.\" Copyright (c) 2007 Michael Kerrisk <mtk.manpages@gmail.com>
7594eb92
MK
2.\"
3.\" Permission is granted to make and distribute verbatim copies of this
4.\" manual provided the copyright notice and this permission notice are
5.\" preserved on all copies.
6.\"
7.\" Permission is granted to copy and distribute modified versions of this
8.\" manual under the conditions for verbatim copying, provided that the
9.\" entire resulting derived work is distributed under the terms of a
10.\" permission notice identical to this one.
11.\"
12.\" Since the Linux kernel and libraries are constantly changing, this
13.\" manual page may be incorrect or out-of-date. The author(s) assume no
14.\" responsibility for errors or omissions, or for damages resulting from
15.\" the use of the information contained herein. The author(s) may not
16.\" have taken the same level of care in the production of this manual,
17.\" which is licensed free of charge, as they might when working
18.\" professionally.
19.\"
20.\" Formatted or processed versions of this manual, if unaccompanied by
21.\" the source, must acknowledge the copyright and authors of this work.
22.\"
b8b64c11 23.TH SYSV_SIGNAL 3 2007-05-04 "" "Linux Programmer's Manual"
7594eb92
MK
24.SH NAME
25sysv_signal \- signal handling with System V semantics
26.SH SYNOPSIS
27.B #define _GNU_SOURCE
28.br
29.B #include <signal.h>
30.sp
31.B typedef void (*sighandler_t)(int);
32.sp
33.BI "sighandler_t sysv_signal(int " signum ", sighandler_t " handler );
34.SH DESCRIPTION
35The
36.BR sysv_signal ()
37function takes the same arguments, and performs the same task, as
38.BR signal (2).
39
40However
41.BR sysv_signal ()
42provides the System V unreliable signal semantics, that is:
43a) the disposition of the signal is reset to the default
44when the handler is invoked;
45b) delivery of further instances of the signal is not blocked while
46the signal handler is executing; and
47c) if the handler interrupts (certain) blocking system calls,
48then the system call is not automatically restarted.
49.SH "RETURN VALUE"
50The
51.BR sysv_signal ()
52function returns the previous value of the signal handler, or
53.B SIG_ERR
54on error.
55.SH ERRORS
56As for
57.BR signal (2).
2b2581ee
MK
58.SH "CONFORMING TO"
59This function is non-standard.
7594eb92
MK
60.SH NOTES
61Use of
62.BR sysv_signal ()
63should be avoided; use
64.BR sigaction (2)
65instead.
66
67On older Linux systems,
68.BR sysv_signal ()
69and
70.BR signal (2)
71were equivalent.
988db661 72But on newer systems,
7594eb92
MK
73.BR signal (2)
74provides reliable signal semantics; see
75.BR signal (2)
76for details.
77
78The use of
f19a0f03 79.I sighandler_t
7594eb92 80is a GNU extension;
988db661 81this type is only defined if
c3dfd2c8
MK
82the
83.B _GNU_SOURCE
84feature test macro is defined.
7594eb92
MK
85.SH "SEE ALSO"
86.BR sigaction (2),
87.BR signal (2),
88.BR bsd_signal (3),
89.BR feature_test_macros (7),
90.BR signal (7)