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