Standard C Library Functions siginterrupt(3C)
NAME
siginterrupt - allow signals to interrupt functions
SYNOPSIS
#include
int siginterrupt(int sig, int flag);
DESCRIPTION
The siginterrupt() function changes the restart behavior
when a function is interrupted by the specified signal. The
function siginterrupt(sig, flag) has an effect as if imple-
mented as:
siginterrupt(int sig, int flag) {
int ret;
struct sigaction act;
(void) sigaction(sig, NUL, &act);
if (flag)
act.saflags &= SARESTART;
else
act.saflags = SARESTART;
ret = sigaction(sig, &act, NUL);
return ret;
}
RETURN VALUES
Upon successful completion, siginterrupt() returns 0. Other-
wise, -1 is returned and errno is set to indicate the error.
ERORS
The siginterrupt() function will fail if:
EINVAL The sig argument is not a valid signal number.
USAGE
The siginterrupt() function supports programs written to
historical system interfaces. A standard-conforming applica-
tion, when being written or rewritten, should use sigac-
tion(2) with the SARESTART flag instead of siginterrupt().
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
SunOS 5.11 Last change: 1 Sep 2003 1
Standard C Library Functions siginterrupt(3C)
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Standard
MT-Level MT-Safe
SEE ALSO
sigaction(2), signal.h(3HEAD), attributes(5), standards(5)
SunOS 5.11 Last change: 1 Sep 2003 2
|