RESTART_SYSCALL
Section: Linux Programmer's Manual (2)
Updated: 2014-02-11
Index
Return to Main Contents
NAME
restart_syscall - restart a system call after interruption by a stop signal
SYNOPSIS
int restart_syscall(void);
Note:
There is no glibc wrapper for this system call; see NOTES.
DESCRIPTION
The
restart_syscall()
system call is used to restart certain system calls
after a process that was stopped by a signal (e.g.,
SIGSTOP
or
SIGTSTP)
is later resumed after receiving a
SIGCONT
signal.
This system call is designed only for internal use by the kernel.
restart_syscall()
is used for restarting only those system calls that,
when restarted, should adjust their time-related parameters---namely
poll(2)
(since Linux 2.6.24),
nanosleep(2)
(since Linux 2.6),
clock_nanosleep(2)
(since Linux 2.6),
and
futex(2),
when employed with the
FUTEX_WAIT
(since Linux 2.6.22)
and
FUTEX_WAIT_BITSET
(since Linux 2.6.31)
operations.
restart_syscall()
restarts the interrupted system call with a
time argument that is suitably adjusted to account for the
time that has already elapsed (including the time where the process
was stopped by a signal).
Without the
restart_syscall()
mechanism, restarting these system calls would not correctly deduce the
already elapsed time when the process continued execution.
RETURN VALUE
The return value of
restart_syscall()
is the return value of whatever system call is being restarted.
ERRORS
errno
is set as per the errors for whatever system call is being restarted by
restart_syscall().
VERSIONS
The
restart_syscall()
system call is present since Linux 2.6.
CONFORMING TO
This system call is Linux-specific.
NOTES
There is no glibc wrapper for this system call,
because it is intended for use only by the kernel and
should never be called by applications.
From user space, the operation of
restart_syscall(2)
is largely invisible:
to the process that made the system call that is restarted,
it appears as though that system call executed and
returned in the usual fashion.
SEE ALSO
sigaction(2),
sigreturn(2),
signal(7)
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- RETURN VALUE
-
- ERRORS
-
- VERSIONS
-
- CONFORMING TO
-
- NOTES
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 02:54:47 GMT, September 18, 2014