Go to main content

man pages section 2: System Calls

Exit Print View

Updated: Thursday, June 13, 2019
 
 

pause(2)

Name

pause - suspend process until signal

Synopsis

#include <unistd.h>

int pause(void);

Description

The pause() function suspends the calling process until it receives a signal. The signal must be one that is not currently set to be ignored by the calling process.

If the signal causes termination of the calling process, pause() does not return.

If the signal is caught by the calling process and control is returned from the signal-catching function (see signal(3C)), the calling process resumes execution from the point of suspension.

Return Values

Since pause() suspends thread execution indefinitely unless interrupted by a signal, there is no successful completion return value. If interrupted, it returns −1 and sets errno to indicate the error.

Errors

The pause() function will fail if:

EINTR

A signal is caught by the calling process and control is returned from the signal-catching function.

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Interface Stability
Committed
MT-Level
Async-Signal-Safe
Standard

See Also

alarm(2), kill(2), signal(3C), wait(3C), attributes(7), standards(7)