|
|
1.1 root 1: .\" Copyright (c) 1983 The Regents of the University of California.
2: .\" All rights reserved.
3: .\"
4: .\" Redistribution and use in source and binary forms are permitted provided
5: .\" that: (1) source distributions retain this entire copyright notice and
6: .\" comment, and (2) distributions including binaries display the following
7: .\" acknowledgement: ``This product includes software developed by the
8: .\" University of California, Berkeley and its contributors'' in the
9: .\" documentation or other materials provided with the distribution and in
10: .\" all advertising materials mentioning features or use of this software.
11: .\" Neither the name of the University nor the names of its contributors may
12: .\" be used to endorse or promote products derived from this software without
13: .\" specific prior written permission.
14: .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
15: .\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
16: .\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17: .\"
18: .\" @(#)sigprocmask.2 6.1 (Berkeley) 7/1/90
19: .\"
20: .TH SIGPROCMASK 2 "July 1, 1990"
21: .UC 7
22: .SH NAME
23: sigprocmask \- manipulate current signal mask
24: .SH SYNOPSIS
25: .nf
26: .B #include <signal.h>
27:
28: .B sigprocmask(how, set, oset);
29: .B int how;
30: .B sigset_t *set, *oset;
31:
32: .B mask = sigmask(signum)
33: .SH DESCRIPTION
34: The
35: .I sigsetmask
36: function examines and/or the current signal mask (those signals
37: that are blocked from delivery).
38: Signals are blocked if they are members of the current signal mask set.
39: .PP
40: If
41: .I set
42: is not null, the action of
43: .I sigsetmask
44: depends on the value of the parameter
45: .IR how .
46: The signal mask is changed as a function of the specified
47: .I set
48: and the current mask.
49: The function is specified by
50: .I how
51: using one of the following values from <signal.h>:
52: .IP SIG_BLOCK \w'SIG_SETMASK\0\0'u
53: The new mask is the union of the current mask and the specified
54: .IR set .
55: .IP SIG_UNBLOCK \w'SIG_SETMASK\0\0'u
56: The new mask is the intersection of the current mask
57: and the complement of the specified
58: .IR set .
59: .IP SIG_SETMASK \w'SIG_SETMASK\0\0'u
60: The current mask is replaced by the specified
61: .IR set .
62: .PP
63: If
64: .I oset
65: is not null,
66: the previous value of the signal mask.
67: When
68: .I set
69: is null, this provides a way to examine the signal mask without changing it.
70: .PP
71: The system
72: quietly disallows SIGKILL or SIGSTOP to be blocked.
73: .SH "RETURN VALUE
74: A 0 value indicated that the call succeeded. A \-1 return value
75: indicates an error occurred and
76: .I errno
77: is set to indicated the reason.
78: .SH ERRORS
79: The
80: .I sigprocmask
81: call will fail and the signal mask will be unchanged if one
82: of the following occurs:
83: .TP 15
84: [EINVAL]
85: .I how
86: has a value other than those listed here.
87: .SH "SEE ALSO"
88: kill(2), sigaction(2), sigsetops(2), sigsuspend(2)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.