1SIGINTERRUPT(3P)           POSIX Programmer's Manual          SIGINTERRUPT(3P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10
11

NAME

13       siginterrupt — allow signals to interrupt functions
14

SYNOPSIS

16       #include <signal.h>
17
18       int siginterrupt(int sig, int flag);
19

DESCRIPTION

21       The siginterrupt() function shall change the restart  behavior  when  a
22       function is interrupted by the specified signal. The function siginter‐
23       rupt(sig, flag) has an effect as if implemented as:
24
25           int siginterrupt(int sig, int flag) {
26               int ret;
27               struct sigaction act;
28
29               (void) sigaction(sig, NULL, &act);
30               if (flag)
31                   act.sa_flags &= ~SA_RESTART;
32               else
33                   act.sa_flags |= SA_RESTART;
34               ret = sigaction(sig, &act, NULL);
35               return ret;
36           }
37

RETURN VALUE

39       Upon successful completion, siginterrupt() shall return  0;  otherwise,
40       −1 shall be returned and errno set to indicate the error.
41

ERRORS

43       The siginterrupt() function shall fail if:
44
45       EINVAL The sig argument is not a valid signal number.
46
47       The following sections are informative.
48

EXAMPLES

50       None.
51

APPLICATION USAGE

53       The  siginterrupt()  function  supports  programs written to historical
54       system interfaces.  Applications should use the  sigaction()  with  the
55       SA_RESTART flag instead of the obsolescent siginterrupt() function.
56

RATIONALE

58       None.
59

FUTURE DIRECTIONS

61       None.
62

SEE ALSO

64       Section 2.4, Signal Concepts, sigaction()
65
66       The Base Definitions volume of POSIX.1‐2008, <signal.h>
67
69       Portions  of  this text are reprinted and reproduced in electronic form
70       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
71       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
72       Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
73       cal  and  Electronics  Engineers,  Inc  and  The  Open Group.  (This is
74       POSIX.1-2008 with the 2013 Technical Corrigendum  1  applied.)  In  the
75       event of any discrepancy between this version and the original IEEE and
76       The Open Group Standard, the original IEEE and The Open Group  Standard
77       is  the  referee document. The original Standard can be obtained online
78       at http://www.unix.org/online.html .
79
80       Any typographical or formatting errors that appear  in  this  page  are
81       most likely to have been introduced during the conversion of the source
82       files to man page format. To report such errors,  see  https://www.ker
83       nel.org/doc/man-pages/reporting_bugs.html .
84
85
86
87IEEE/The Open Group                  2013                     SIGINTERRUPT(3P)
Impressum