1SIGINTERRUPT(3) Linux Programmer's Manual SIGINTERRUPT(3)
2
3
4
6 siginterrupt - allow signals to interrupt system calls
7
9 #include <signal.h>
10
11 int siginterrupt(int sig, int flag);
12
14 The siginterrupt() function changes the restart behaviour when a system
15 call is interrupted by the signal sig. If the flag argument is false
16 (0), then system calls will be restarted if interrupted by the speciā
17 fied signal sig. This is the default behaviour in Linux. However,
18 when a new signal handler is specified with the signal(2) function, the
19 system call is interrupted by default.
20
21 If the flags argument is true (1) and no data has been transferred,
22 then a system call interrupted by the signal sig will return -1 and the
23 global variable errno will be set to EINTR.
24
25 If the flags argument is true (1) and data transfer has started, then
26 the system call will be interrupted and will return the actual amount
27 of data transferred.
28
30 The siginterrupt() function returns 0 on success, or -1 if the signal
31 number sig is invalid.
32
34 EINVAL The specified signal number is invalid.
35
37 4.3BSD, POSIX.1-2001.
38
40 signal(2)
41
42
43
44 1993-04-13 SIGINTERRUPT(3)