1SIGINTERRUPT(3)            Linux Programmer's Manual           SIGINTERRUPT(3)
2
3
4

NAME

6       siginterrupt - allow signals to interrupt system calls
7

SYNOPSIS

9       #include <signal.h>
10
11       int siginterrupt(int sig, int flag);
12
13   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
14
15       siginterrupt():
16           _XOPEN_SOURCE >= 500
17               || /* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200809L
18               || /* Glibc versions <= 2.19: */ _BSD_SOURCE
19

DESCRIPTION

21       The  siginterrupt() function changes the restart behavior when a system
22       call is interrupted by the signal sig.  If the flag argument  is  false
23       (0),  then  system calls will be restarted if interrupted by the speci‐
24       fied signal sig.  This is the default behavior in Linux.
25
26       If the flag argument is true (1) and no data has been transferred, then
27       a  system  call  interrupted by the signal sig will return -1 and errno
28       will be set to EINTR.
29
30       If the flag argument is true (1) and data transfer  has  started,  then
31       the  system  call will be interrupted and will return the actual amount
32       of data transferred.
33

RETURN VALUE

35       The siginterrupt() function returns 0 on success.  It returns -1 if the
36       signal  number  sig is invalid, with errno set to indicate the cause of
37       the error.
38

ERRORS

40       EINVAL The specified signal number is invalid.
41

ATTRIBUTES

43       For  an  explanation  of  the  terms  used   in   this   section,   see
44       attributes(7).
45
46       ┌───────────────┬───────────────┬─────────────────────────┐
47Interface      Attribute     Value                   
48       ├───────────────┼───────────────┼─────────────────────────┤
49siginterrupt() │ Thread safety │ MT-Unsafe const:sigintr │
50       └───────────────┴───────────────┴─────────────────────────┘

CONFORMING TO

52       4.3BSD,  POSIX.1-2001.   POSIX.1-2008 marks siginterrupt() as obsolete,
53       recommending the use of sigaction(2) with the SA_RESTART flag instead.
54

SEE ALSO

56       signal(2)
57

COLOPHON

59       This page is part of release 4.16 of the Linux  man-pages  project.   A
60       description  of  the project, information about reporting bugs, and the
61       latest    version    of    this    page,    can     be     found     at
62       https://www.kernel.org/doc/man-pages/.
63
64
65
66                                  2016-03-15                   SIGINTERRUPT(3)
Impressum