1SIGINTERRUPT(3) Library Functions Manual SIGINTERRUPT(3)
2
3
4
6 siginterrupt - allow signals to interrupt system calls
7
9 siginterrupt(sig, flag);
10 int sig, flag;
11
13 Siginterrupt is used to change the system call restart behavior when a
14 system call is interrupted by the specified signal. If the flag is
15 false (0), then system calls will be restarted if they are interrupted
16 by the specified signal and no data has been transferred yet. System
17 call restart is the default behavior on 4.2 BSD.
18
19 If the flag is true (1), then restarting of system calls is disabled.
20 If a system call is interrupted by the specified signal and no data has
21 been transferred, the system call will return -1 with errno set to
22 EINTR. Interrupted system calls that have started transferring data
23 will return the amount of data actually transferred. System call
24 interrupt is the signal behavior found on 4.1 BSD and AT&T System V
25 UNIX systems.
26
27 Note that the new 4.2 BSD signal handling semantics are not altered in
28 any other way. Most notably, signal handlers always remain installed
29 until explicitly changed by a subsequent sigvec(2) call, and the signal
30 mask operates as documented in sigvec(2). Programs may switch between
31 restartable and interruptible system call operation as often as desired
32 in the execution of a program.
33
34 Issuing a siginterrupt(3) call during the execution of a signal handler
35 will cause the new action to take place on the next signal to be
36 caught.
37
39 This library routine uses an extension of the sigvec(2) system call
40 that is not available in 4.2BSD, hence it should not be used if back‐
41 ward compatibility is needed.
42
44 A 0 value indicates that the call succeeded. A -1 value indicates that
45 an invalid signal number has been supplied.
46
48 sigvec(2), sigblock(2), sigpause(2), sigsetmask(2).
49
50
51
524.3 Berkeley Distribution May 15, 1985 SIGINTERRUPT(3)