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

NAME

6       siginterrupt - allow signals to interrupt functions
7

SYNOPSIS

9       #include <signal.h>
10
11       int siginterrupt(int sig, int flag);
12
13

DESCRIPTION

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

RETURN VALUE

35       Upon  successful  completion, siginterrupt() shall return 0; otherwise,
36       -1 shall be returned and errno set to indicate the error.
37

ERRORS

39       The siginterrupt() function shall fail if:
40
41       EINVAL The sig argument is not a valid signal number.
42
43
44       The following sections are informative.
45

EXAMPLES

47       None.
48

APPLICATION USAGE

50       The siginterrupt() function supports  programs  written  to  historical
51       system  interfaces.  A  conforming  application,  when being written or
52       rewritten, should use sigaction() with the SA_RESTART flag  instead  of
53       siginterrupt().
54

RATIONALE

56       None.
57

FUTURE DIRECTIONS

59       None.
60

SEE ALSO

62       Signal  Concepts  ,  sigaction()  ,  the  Base  Definitions  volume  of
63       IEEE Std 1003.1-2001, <signal.h>
64
66       Portions of this text are reprinted and reproduced in  electronic  form
67       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
68       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
69       Specifications  Issue  6,  Copyright  (C) 2001-2003 by the Institute of
70       Electrical and Electronics Engineers, Inc and The Open  Group.  In  the
71       event of any discrepancy between this version and the original IEEE and
72       The Open Group Standard, the original IEEE and The Open Group  Standard
73       is  the  referee document. The original Standard can be obtained online
74       at http://www.opengroup.org/unix/online.html .
75
76
77
78IEEE/The Open Group                  2003                      SIGINTERRUPT(P)
Impressum