2 .\" Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH SIGINTERRUPT 3C "Sep 1, 2003"
8 siginterrupt \- allow signals to interrupt functions
14 \fBint\fR \fBsiginterrupt\fR(\fBint\fR \fIsig\fR, \fBint\fR \fIflag\fR);
20 The \fBsiginterrupt()\fR function changes the restart behavior when a function
21 is interrupted by the specified signal. The function
22 \fBsiginterrupt\fR(\fIsig\fR, \fIflag\fR) has an effect as if implemented as:
26 siginterrupt(int sig, int flag) {
29 (void) sigaction(sig, NULL, &act);
31 act.sa_flags &= SA_RESTART;
33 act.sa_flags |= SA_RESTART;
34 ret = sigaction(sig, &act, NULL);
43 Upon successful completion, \fBsiginterrupt()\fR returns 0. Otherwise, \(mi1 is
44 returned and \fBerrno\fR is set to indicate the error.
48 The \fBsiginterrupt()\fR function will fail if:
55 The \fIsig\fR argument is not a valid signal number.
61 The \fBsiginterrupt()\fR function supports programs written to historical
62 system interfaces. A standard-conforming application, when being written or
63 rewritten, should use \fBsigaction\fR(2) with the \fBSA_RESTART\fR flag instead
64 of \fBsiginterrupt()\fR.
68 See \fBattributes\fR(5) for descriptions of the following attributes:
76 ATTRIBUTE TYPE ATTRIBUTE VALUE
78 Interface Stability Standard
86 \fBsigaction\fR(2), \fBsignal.h\fR(3HEAD), \fBattributes\fR(5),