1. NAME

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

2. SYNOPSIS

int restart_syscall(void); Note : There is no glibc wrapper for this system call; see NOTES.

3. DESCRIPTION

The

R restart_syscall () system call is used to restart certain system calls after a process that was stopped by a signal (e.g.,

R SIGSTOP or

R SIGTSTP ) is later resumed after receiving a

R SIGCONT signal. This system call is designed only for internal use by the kernel.

R restart_syscall () is used for restarting only those system calls that, when restarted, should adjust their time-related parametersnamely

R poll (2) (since Linux 2.6.24),

R nanosleep (2) (since Linux 2.6),

R clock_nanosleep (2) (since Linux 2.6), and

R futex (2), when employed with the

R FUTEX_WAIT (since Linux 2.6.22) and

R FUTEX_WAIT_BITSET (since Linux 2.6.31) operations.

R 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

R restart_syscall () mechanism, restarting these system calls would not correctly deduce the already elapsed time when the process continued execution.

4. RETURN VALUE

The return value of

R restart_syscall () is the return value of whatever system call is being restarted.

5. ERRORS

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

R restart_syscall ().

6. VERSIONS

The

R restart_syscall () system call is present since Linux 2.6.

7. CONFORMING TO

This system call is Linux specific.

8. 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

R 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.

9. SEE ALSO

R sigreturn (2),

R sigaction (2),

R signal (7)