'\" te .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 1985 Regents of the University of California. All rights reserved. The Berkeley software License Agreement specifies the terms and conditions for redistribution. .TH SIGINTERRUPT 3UCB "Oct 30, 2007" .SH NAME siginterrupt \- allow signals to interrupt functions .SH SYNOPSIS .LP .nf \fB/usr/ucb/cc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fBint\fR \fBsiginterrupt\fR(\fIsig\fR, \fIflag\fR) \fBint\fR \fIsig\fR, \fIflag\fR; .fi .SH DESCRIPTION .sp .LP \fBsiginterrupt()\fR is used to change the function restart behavior when a function is interrupted by the specified signal. If the flag is false (\fB0\fR), then functions will be restarted if they are interrupted by the specified signal and no data has been transferred yet. System call restart is the default behavior when the \fBsignal\fR(3C) routine is used. .sp .LP If the flag is true, (\fB1\fR), then restarting of functions is disabled. If a function is interrupted by the specified signal and no data has been transferred, the function will return \fB\(mi1\fR with \fBerrno\fR set to \fBEINTR\fR. Interrupted functions that have started transferring data will return the amount of data actually transferred. .sp .LP Issuing a \fBsiginterrupt()\fR call during the execution of a signal handler will cause the new action to take place on the next signal to be caught. .SH RETURN VALUES .sp .LP A \fB0\fR value indicates that the call succeeded. A \fB\(mi1\fR value indicates that the call failed and \fBerrno\fR is set to indicate the error. .SH ERRORS .sp .LP \fBsiginterrupt()\fR may return the following error: .sp .ne 2 .na \fB\fBEINVAL\fR\fR .ad .RS 10n \fIsig\fR is not a valid signal. .RE .SH SEE ALSO .sp .LP \fBsigblock\fR(3UCB), \fBsigvec\fR(3UCB), \fBsignal\fR(3C) .SH NOTES .sp .LP Use of these interfaces should be restricted to only applications written on BSD platforms. Use of these interfaces with any of the system libraries or in multi-threaded applications is unsupported. .sp .LP This library routine uses an extension of the \fBsigvec\fR(3UCB) function that is not available in 4.2 BSD, hence it should not be used if backward compatibility is needed.