restart_syscall






restart_syscall − restart a system call after interruption
by a stop signal

intrestart_syscall(void);

     There is no glibc wrapper for this system call; see
NOTES.

The system call is used to restart certain system calls
after a process that was stopped by a signal (e.g., or is
later resumed after receiving a signal.  This system call is
designed only for internal use by the kernel.

     is used for restarting only those system calls that,
when restarted, should adjust their time‐related parameters—
namely (since Linux 2.6.24), (since Linux 2.6), (since Linux
2.6), and when employed with the (since Linux 2.6.22) and
(since Linux 2.6.31) operations.  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 mechanism, restarting these system calls would
not correctly deduct the already elapsed time when the
process continued execution.

The return value of is the return value of whatever system
call is being restarted.

errno is set as per the errors for whatever system call is
being restarted by

The system call is present since Linux 2.6.

This system call is Linux‐specific.

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.

     The kernel uses to ensure that when a system call is
restarted after a process has been stopped by a signal and
then resumed by then the time that the process spent in the
stopped state is counted against the timeout interval
specified in the original system call.  In the case of
system calls that take a timeout argument and automatically
restart after a stop signal plus but which do not have the
mechanism built in, then, after the process resumes
execution, the time that the process spent in the stop state
is not counted against the timeout value.  Notable examples
of system calls that suffer this problem are and

     From user space, the operation of is largely invisible:
to the process that made the system call that is restarted,
it appears as though that system call executed and returned









                             ‐2‐


in the usual fashion.



This page is part of release 5.07 of the Linux man‐pages
project.  A description of the project, information about
reporting bugs, and the latest version of this page, can be
found at https://www.kernel.org/doc/man−pages/.