2 .\" Copyright (c) 2007 Michael Kerrisk <mtk.manpages@gmail.com>
4 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
6 .TH bsd_signal 3 (date) "Linux man-pages (unreleased)"
8 bsd_signal \- signal handling with BSD semantics
11 .RI ( libc ", " \-lc )
14 .B #include <signal.h>
16 .B typedef void (*sighandler_t)(int);
18 .BI "sighandler_t bsd_signal(int " signum ", sighandler_t " handler );
22 Feature Test Macro Requirements for glibc (see
23 .BR feature_test_macros (7)):
30 .\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED
31 && ! (_POSIX_C_SOURCE >= 200809L)
32 glibc 2.25 and earlier:
38 function takes the same arguments, and performs the same task, as
41 The difference between the two is that
43 is guaranteed to provide reliable signal semantics, that is:
44 a) the disposition of the signal is not reset to the default
45 when the handler is invoked;
46 b) delivery of further instances of the signal is blocked while
47 the signal handler is executing; and
48 c) if the handler interrupts a blocking system call,
49 then the system call is automatically restarted.
50 A portable application cannot rely on
52 to provide these guarantees.
56 function returns the previous value of the signal handler, or
63 For an explanation of the terms used in this section, see
69 Interface Attribute Value
74 T} Thread safety MT-Safe
79 should be avoided; use
83 On modern Linux systems,
90 provided unreliable signal semantics; see
97 this type is defined only if the
99 feature test macro is defined.
103 4.2BSD, POSIX.1-2001.
104 Removed in POSIX.1-2008,
105 recommending the use of