|
|
1.1 root 1: .\" Copyright (c) 1985 Regents of the University of California.
2: .\" All rights reserved. The Berkeley software License Agreement
3: .\" specifies the terms and conditions for redistribution.
4: .\"
5: .\" @(#)siginterrupt.3 6.1 (Berkeley) 5/15/85
6: .\"
7: .TH SIGINTERRUPT 3 "May 15, 1985"
8: .UC 6
9: .SH NAME
10: siginterrupt \- allow signals to interrupt system calls
11: .SH SYNOPSIS
12: .nf
13: .B siginterrupt(sig, flag);
14: .B int sig, flag;
15: .SH DESCRIPTION
16: .I Siginterrupt
17: is used to change the system call restart
18: behavior when a system call is interrupted by the specified signal.
19: If the flag is false (0), then system calls will be restarted if
20: they are interrupted by the specified signal
21: and no data has been transferred yet.
22: System call restart is the default behavior on 4.2 BSD.
23: .PP
24: If the flag is true (1), then restarting of system calls is disabled.
25: If a system call is interrupted by the specified signal
26: and no data has been transferred,
27: the system call will return -1 with errno set to EINTR.
28: Interrupted system calls that have started transferring
29: data will return the amount of data actually transferred.
30: System call interrupt is the signal behavior found on 4.1 BSD
31: and AT&T System V UNIX systems.
32: .PP
33: Note that the new 4.2 BSD signal handling semantics are not
34: altered in any other way.
35: Most notably, signal handlers always remain installed until
36: explicitly changed by a subsequent
37: .IR sigvec (2)
38: call, and the signal mask operates as documented in
39: .IR sigvec (2).
40: Programs may switch between restartable and interruptible
41: system call operation as often as desired in the execution of a program.
42: .PP
43: Issuing a
44: .IR siginterrupt (3)
45: call during the execution of a signal handler will cause
46: the new action to take place on the next signal to be caught.
47: .SH NOTES
48: This library routine uses an extension of the
49: .IR sigvec (2)
50: system call that is not available in 4.2BSD,
51: hence it should not be used if backward compatibility is needed.
52: .SH "RETURN VALUE
53: A 0 value indicates that the call succeeded.
54: A -1 value indicates that an invalid signal number has been supplied.
55: .SH "SEE ALSO"
56: sigvec(2), sigblock(2), sigpause(2), sigsetmask(2).
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.