This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH v2 5/7] linux: Remove SIGCANCEL/SIGSETXID handling on sigprocmask
- From: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- To: libc-alpha at sourceware dot org
- Date: Tue, 10 Dec 2019 15:32:19 -0300
- Subject: [PATCH v2 5/7] linux: Remove SIGCANCEL/SIGSETXID handling on sigprocmask
- References: <20191210183221.26912-1-adhemerval.zanella@linaro.org>
The sigfillset already does it, and this is the canonical way to operate
on sigset_t. The only way to actually broke this assumption is if caller
initialize sigset with memset or something similar, i.e, bypassing glibc
(and again this is not a valid construction).
Checked on x86_64-linux-gnu.
---
sysdeps/unix/sysv/linux/sigprocmask.c | 16 +---------------
1 file changed, 1 insertion(+), 15 deletions(-)
diff --git a/sysdeps/unix/sysv/linux/sigprocmask.c b/sysdeps/unix/sysv/linux/sigprocmask.c
index 73b0d0c19a..c6961a8ac4 100644
--- a/sysdeps/unix/sysv/linux/sigprocmask.c
+++ b/sysdeps/unix/sysv/linux/sigprocmask.c
@@ -16,26 +16,12 @@
<https://www.gnu.org/licenses/>. */
#include <signal.h>
-#include <nptl/pthreadP.h> /* SIGCANCEL, SIGSETXID */
+#include <sysdep.h>
/* Get and/or change the set of blocked signals. */
int
__sigprocmask (int how, const sigset_t *set, sigset_t *oset)
{
- sigset_t local_newmask;
-
- /* The only thing we have to make sure here is that SIGCANCEL and
- SIGSETXID are not blocked. */
- if (set != NULL
- && __glibc_unlikely (__sigismember (set, SIGCANCEL)
- || __glibc_unlikely (__sigismember (set, SIGSETXID))))
- {
- local_newmask = *set;
- __sigdelset (&local_newmask, SIGCANCEL);
- __sigdelset (&local_newmask, SIGSETXID);
- set = &local_newmask;
- }
-
return INLINE_SYSCALL_CALL (rt_sigprocmask, how, set, oset, _NSIG / 8);
}
libc_hidden_def (__sigprocmask)
--
2.17.1