ioctl_tty.2: Remove duplicated text
[man-pages.git] / man2 / sgetmask.2
blob59b58ceaf9a5d190de9ebb4b3b4fddccdb836b5f
1 .\" Copyright (c) 2007 by Michael Kerrisk <mtk.manpages@gmail.com>
2 .\"
3 .\" %%%LICENSE_START(VERBATIM)
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
7 .\"
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
12 .\"
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein.  The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
19 .\" professionally.
20 .\"
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" %%%LICENSE_END
24 .\"
25 .TH SGETMASK 2  2021-03-22 "Linux" "Linux Programmer's Manual"
26 .SH NAME
27 sgetmask, ssetmask \- manipulation of signal mask (obsolete)
28 .SH SYNOPSIS
29 .nf
30 .BR "#include <sys/syscall.h>" "      /* Definition of " SYS_* " constants */"
31 .B #include <unistd.h>
32 .PP
33 .B "long syscall(SYS_sgetmask, void);"
34 .BI "long syscall(SYS_ssetmask, long " newmask );
35 .fi
36 .PP
37 .IR Note :
38 glibc provides no wrappers for these functions,
39 necessitating the use of
40 .BR syscall (2).
41 .SH DESCRIPTION
42 These system calls are obsolete.
43 .IR "Do not use them" ;
44 use
45 .BR sigprocmask (2)
46 instead.
47 .PP
48 .BR sgetmask ()
49 returns the signal mask of the calling process.
50 .PP
51 .BR ssetmask ()
52 sets the signal mask of the calling process to the value given in
53 .IR newmask .
54 The previous signal mask is returned.
55 .PP
56 The signal masks dealt with by these two system calls
57 are plain bit masks (unlike the
58 .I sigset_t
59 used by
60 .BR sigprocmask (2));
61 use
62 .BR sigmask (3)
63 to create and inspect these masks.
64 .SH RETURN VALUE
65 .BR sgetmask ()
66 always successfully returns the signal mask.
67 .BR ssetmask ()
68 always succeeds, and returns the previous signal mask.
69 .SH ERRORS
70 These system calls always succeed.
71 .SH VERSIONS
72 Since Linux 3.16,
73 .\" f6187769dae48234f3877df3c4d99294cc2254fa
74 support for these system calls is optional,
75 depending on whether the kernel was built with the
76 .B CONFIG_SGETMASK_SYSCALL
77 option.
78 .SH CONFORMING TO
79 These system calls are Linux-specific.
80 .SH NOTES
81 These system calls are unaware of signal numbers greater than 31
82 (i.e., real-time signals).
83 .PP
84 These system calls do not exist on x86-64.
85 .PP
86 It is not possible to block
87 .B SIGSTOP
89 .BR SIGKILL .
90 .SH SEE ALSO
91 .BR sigprocmask (2),
92 .BR signal (7)