1PAUSE(P)                   POSIX Programmer's Manual                  PAUSE(P)
2
3
4

NAME

6       pause - suspend the thread until a signal is received
7

SYNOPSIS

9       #include <unistd.h>
10
11       int pause(void);
12
13

DESCRIPTION

15       The pause() function shall suspend the calling thread until delivery of
16       a signal whose action is either to execute a  signal-catching  function
17       or to terminate the process.
18
19       If the action is to terminate the process, pause() shall not return.
20
21       If  the  action is to execute a signal-catching function, pause() shall
22       return after the signal-catching function returns.
23

RETURN VALUE

25       Since pause() suspends thread execution indefinitely unless interrupted
26       by a signal, there is no successful completion return value. A value of
27       -1 shall be returned and errno set to indicate the error.
28

ERRORS

30       The pause() function shall fail if:
31
32       EINTR  A signal is  caught  by  the  calling  process  and  control  is
33              returned from the signal-catching function.
34
35
36       The following sections are informative.
37

EXAMPLES

39       None.
40

APPLICATION USAGE

42       Many  common uses of pause() have timing windows. The scenario involves
43       checking a condition related to a signal and, if  the  signal  has  not
44       occurred, calling pause(). When the signal occurs between the check and
45       the call to pause(), the process often blocks  indefinitely.  The  sig‐
46       procmask() and sigsuspend() functions can be used to avoid this type of
47       problem.
48

RATIONALE

50       None.
51

FUTURE DIRECTIONS

53       None.
54

SEE ALSO

56       sigsuspend() , the Base  Definitions  volume  of  IEEE Std 1003.1-2001,
57       <unistd.h>
58
60       Portions  of  this text are reprinted and reproduced in electronic form
61       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
62       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
63       Specifications Issue 6, Copyright (C) 2001-2003  by  the  Institute  of
64       Electrical  and  Electronics  Engineers, Inc and The Open Group. In the
65       event of any discrepancy between this version and the original IEEE and
66       The  Open Group Standard, the original IEEE and The Open Group Standard
67       is the referee document. The original Standard can be  obtained  online
68       at http://www.opengroup.org/unix/online.html .
69
70
71
72IEEE/The Open Group                  2003                             PAUSE(P)
Impressum