1siginterrupt(3C)         Standard C Library Functions         siginterrupt(3C)
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 changes the restart behavior when a func‐
16       tion is interrupted by the specified  signal.  The  function  siginter‐
17       rupt(sig, flag) has an effect as if implemented as:
18
19         siginterrupt(int sig, int flag) {
20              int ret;
21              struct sigaction act;
22              (void) sigaction(sig, NULL, &act);
23              if (flag)
24                   act.sa_flags &=  SA_RESTART;
25              else
26                   act.sa_flags |= SA_RESTART;
27              ret = sigaction(sig, &act, NULL);
28              return ret;
29         }
30
31

RETURN VALUES

33       Upon  successful completion, siginterrupt() returns 0. Otherwise, −1 is
34       returned and errno is set to indicate the error.
35

ERRORS

37       The siginterrupt() function will fail if:
38
39       EINVAL    The sig argument is not a valid signal number.
40
41

USAGE

43       The siginterrupt() function supports  programs  written  to  historical
44       system  interfaces. A standard-conforming application, when being writ‐
45       ten or rewritten, should use  sigaction(2)  with  the  SA_RESTART  flag
46       instead of siginterrupt().
47

ATTRIBUTES

49       See attributes(5) for descriptions of the following attributes:
50
51
52
53
54       ┌─────────────────────────────┬─────────────────────────────┐
55       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
56       ├─────────────────────────────┼─────────────────────────────┤
57       │Interface Stability          │Standard                     │
58       ├─────────────────────────────┼─────────────────────────────┤
59       │MT-Level                     │MT-Safe                      │
60       └─────────────────────────────┴─────────────────────────────┘
61

SEE ALSO

63       sigaction(2), signal.h(3HEAD), attributes(5), standards(5)
64
65
66
67SunOS 5.11                        1 Sep 2003                  siginterrupt(3C)
Impressum