Commit | Line | Data |
---|---|---|
9b55b9db KM |
1 | .\" Copyright (c) 1980 Regents of the University of California. |
2 | .\" All rights reserved. The Berkeley software License Agreement | |
3 | .\" specifies the terms and conditions for redistribution. | |
4 | .\" | |
4c40fc65 | 5 | .\" @(#)sigpause.2 6.1 (Berkeley) %G% |
9b55b9db | 6 | .\" |
4c40fc65 | 7 | .TH SIGPAUSE 2 "" |
9b55b9db KM |
8 | .UC 4 |
9 | .SH NAME | |
9d5a8e29 | 10 | sigpause \- atomically release blocked signals and wait for interrupt |
9b55b9db | 11 | .SH SYNOPSIS |
9d5a8e29 KM |
12 | .ft B |
13 | sigpause(sigmask) | |
14 | .br | |
15 | int sigmask; | |
16 | .ft R | |
9b55b9db | 17 | .SH DESCRIPTION |
9d5a8e29 KM |
18 | .I Sigpause |
19 | assigns | |
20 | .I sigmask | |
21 | to the set of masked signals | |
22 | and then waits for a signal to arrive; | |
23 | on return the set of masked signals is restored. | |
24 | .I Sigmask | |
25 | is usually 0 to indicate that no | |
26 | signals are now to be blocked. | |
27 | .I Sigpause | |
4c40fc65 KM |
28 | always terminates by being interrupted, returning \-1 with |
29 | .I errno | |
30 | set to EINTR. | |
9d5a8e29 KM |
31 | .PP |
32 | In normal usage, a signal is blocked using | |
33 | .IR sigblock (2), | |
34 | to begin a critical section, variables modified on the occurance | |
35 | of the signal are examined to determine that there is no work | |
36 | to be done, and the process pauses awaiting work by using | |
37 | .I sigpause | |
38 | with the mask returned by | |
39 | .IR sigblock . | |
9b55b9db | 40 | .SH SEE ALSO |
9d5a8e29 | 41 | sigblock(2), sigvec(2) |