siginterrupt()

allow signals to interrupt system calls 

Function


SYNOPSIS

#include <signal.h>

int siginterrupt(int sig, int flag);


DESCRIPTION

The siginterrupt() function is used to change the restart behavior when a function is interrupted by the specified signal. The call siginterrupt(sig, flag) has an affect as if implemented as:

int siginterrupt(int sig, int flag) {
	struct sigaction act;
	(void)sigaction(sig, NULL, &act);
	if (flag)
		act.sa_flags &= ~SA_RESTART;
	else
		act.sa_flags |= SA_RESTART;
	return
	sigaction(sig, &act, NULL);
}

PARAMETERS

sig 

Is the signal number for which the restart state is to be modified.

flag 

Determines whether sig interrupts system calls. If true, sig does interrupt. Otherwise, system calls are restarted when possible.


RETURN VALUES

On success, siginterrupt() return 0. Otherwise, it returns -1 and errno is set to one of the following values:

EINVAL 

The value of sig is an invalid or unsupported signal number.


CONFORMANCE

UNIX 98


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

None.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
sigaction(), signal()


PTC MKS Toolkit 10.4 Documentation Build 39.