summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/sigprocmask.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-04-21 07:39:20 +0000
committerUlrich Drepper <drepper@redhat.com>2003-04-21 07:39:20 +0000
commite7608d778994e0236b2fe66ec70bb0c5a0aa0282 (patch)
treed2156ad08ad4e71afe0e74b9245c0ded5ef0718e /sysdeps/unix/sysv/linux/sigprocmask.c
parenta4faf24354ee98ef226a9012f2835cd771380882 (diff)
Update.
2003-04-21 Ulrich Drepper <drepper@redhat.com> * sysdeps/unix/sysv/linux/sigprocmask.c: Prevent changing mask for SIGCANCEL. * sysdeps/unix/sysv/linux/alpha/bits/siginfo.h: Define SI_TKILL. * sysdeps/unix/sysv/linux/bits/siginfo.h: Define SI_TKILL. * sysdeps/unix/sysv/linux/ia64/bits/siginfo.h: Define SI_TKILL. * sysdeps/unix/sysv/linux/s390/bits/siginfo.h: Define SI_TKILL. * sysdeps/unix/sysv/linux/sparc/bits/siginfo.h: Define SI_TKILL. first syscall parameter to const char*.
Diffstat (limited to 'sysdeps/unix/sysv/linux/sigprocmask.c')
-rw-r--r--sysdeps/unix/sysv/linux/sigprocmask.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/sigprocmask.c b/sysdeps/unix/sysv/linux/sigprocmask.c
index 7a73d9c373..db8986aafb 100644
--- a/sysdeps/unix/sysv/linux/sigprocmask.c
+++ b/sysdeps/unix/sysv/linux/sigprocmask.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1997,1998,1999,2000,2001,2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -44,6 +44,19 @@ __sigprocmask (how, set, oset)
const sigset_t *set;
sigset_t *oset;
{
+#ifdef SIGCANCEL
+ sigset_t local_newmask;
+
+ /* The only thing we have to make sure here is that SIGCANCEL is not
+ blocked. */
+ if (set != NULL && __builtin_expect (__sigismember (set, SIGCANCEL), 0))
+ {
+ local_newmask = *set;
+ __sigdelset (&local_newmask, SIGCANCEL);
+ set = &local_newmask;
+ }
+#endif
+
#if __ASSUME_REALTIME_SIGNALS > 0
return INLINE_SYSCALL (rt_sigprocmask, 4, how, CHECK_SIGSET_NULL_OK (set),
CHECK_SIGSET_NULL_OK (oset), _NSIG / 8);