Commit | Line | Data |
---|---|---|
88b3ccf2 KB |
1 | .\" Copyright (c) 1983 The Regents of the University of California. |
2 | .\" All rights reserved. | |
9b55b9db | 3 | .\" |
88b3ccf2 KB |
4 | .\" Redistribution and use in source and binary forms are permitted |
5 | .\" provided that the above copyright notice and this paragraph are | |
6 | .\" duplicated in all such forms and that any documentation, | |
7 | .\" advertising materials, and other materials related to such | |
8 | .\" distribution and use acknowledge that the software was developed | |
9 | .\" by the University of California, Berkeley. The name of the | |
10 | .\" University may not be used to endorse or promote products derived | |
11 | .\" from this software without specific prior written permission. | |
12 | .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR | |
13 | .\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | |
14 | .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
15 | .\" | |
16 | .\" @(#)sigpause.2 6.3 (Berkeley) %G% | |
9b55b9db | 17 | .\" |
4c40fc65 | 18 | .TH SIGPAUSE 2 "" |
9b55b9db KM |
19 | .UC 4 |
20 | .SH NAME | |
9d5a8e29 | 21 | sigpause \- atomically release blocked signals and wait for interrupt |
9b55b9db | 22 | .SH SYNOPSIS |
9d5a8e29 KM |
23 | .ft B |
24 | sigpause(sigmask) | |
25 | .br | |
26 | int sigmask; | |
27 | .ft R | |
9b55b9db | 28 | .SH DESCRIPTION |
9d5a8e29 KM |
29 | .I Sigpause |
30 | assigns | |
31 | .I sigmask | |
32 | to the set of masked signals | |
33 | and then waits for a signal to arrive; | |
34 | on return the set of masked signals is restored. | |
35 | .I Sigmask | |
36 | is usually 0 to indicate that no | |
37 | signals are now to be blocked. | |
38 | .I Sigpause | |
4c40fc65 KM |
39 | always terminates by being interrupted, returning \-1 with |
40 | .I errno | |
41 | set to EINTR. | |
9d5a8e29 KM |
42 | .PP |
43 | In normal usage, a signal is blocked using | |
44 | .IR sigblock (2), | |
09cfce6f | 45 | to begin a critical section, variables modified on the occurrence |
9d5a8e29 KM |
46 | of the signal are examined to determine that there is no work |
47 | to be done, and the process pauses awaiting work by using | |
48 | .I sigpause | |
49 | with the mask returned by | |
50 | .IR sigblock . | |
9b55b9db | 51 | .SH SEE ALSO |
9d5a8e29 | 52 | sigblock(2), sigvec(2) |