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

NAME

12       siginterrupt - allow signals to interrupt functions
13

SYNOPSIS

15       #include <signal.h>
16
17       int siginterrupt(int sig, int flag);
18
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
26              int siginterrupt(int sig, int flag) {
27                  int ret;
28                  struct sigaction act;
29
30
31                  (void) sigaction(sig, NULL, &act);
32                  if (flag)
33                      act.sa_flags &= ~SA_RESTART;
34                  else
35                      act.sa_flags |= SA_RESTART;
36                  ret = sigaction(sig, &act, NULL);
37                  return ret;
38              }
39

RETURN VALUE

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

ERRORS

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

EXAMPLES

53       None.
54

APPLICATION USAGE

56       The  siginterrupt()  function  supports  programs written to historical
57       system interfaces. A conforming  application,  when  being  written  or
58       rewritten,  should  use sigaction() with the SA_RESTART flag instead of
59       siginterrupt().
60

RATIONALE

62       None.
63

FUTURE DIRECTIONS

65       None.
66

SEE ALSO

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