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           _BSD_SOURCE || _XOPEN_SOURCE >= 500 ||
17           _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED
18           || /* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200809L
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

CONFORMING TO

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

SEE ALSO

47       signal(2)
48

COLOPHON

50       This page is part of release 3.53 of the Linux  man-pages  project.   A
51       description  of  the project, and information about reporting bugs, can
52       be found at http://www.kernel.org/doc/man-pages/.
53
54
55
56                                  2013-04-19                   SIGINTERRUPT(3)
Impressum