1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
3 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
5 .\" References consulted:
6 .\" Linux libc source code
7 .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
9 .\" Modified Sun Jul 25 10:40:51 1993 by Rik Faith (faith@cs.unc.edu)
10 .\" Modified Sun Apr 14 16:20:34 1996 by Andries Brouwer (aeb@cwi.nl)
11 .TH SIGINTERRUPT 3 2022-09-09 "Linux man-pages (unreleased)"
13 siginterrupt \- allow signals to interrupt system calls
16 .RI ( libc ", " \-lc )
19 .B #include <signal.h>
21 .BI "int siginterrupt(int " sig ", int " flag );
25 Feature Test Macro Requirements for glibc (see
26 .BR feature_test_macros (7)):
32 .\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED
33 || /* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200809L
34 || /* Glibc <= 2.19: */ _BSD_SOURCE
39 function changes the restart behavior when
40 a system call is interrupted by the signal \fIsig\fP.
42 argument is false (0), then system calls will be restarted if interrupted
43 by the specified signal \fIsig\fP.
44 This is the default behavior in Linux.
46 If the \fIflag\fP argument is true (1) and no data has been transferred,
47 then a system call interrupted by the signal \fIsig\fP will return \-1
48 and \fIerrno\fP will be set to
51 If the \fIflag\fP argument is true (1) and data transfer has started,
52 then the system call will be interrupted and will return the actual
53 amount of data transferred.
57 function returns 0 on success.
63 set to indicate the error.
67 The specified signal number is invalid.
69 For an explanation of the terms used in this section, see
77 Interface Attribute Value
81 MT-Unsafe const:sigintr
91 as obsolete, recommending the use of