summaryrefslogtreecommitdiff
path: root/libc/signal
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2015-12-10 11:21:13 +0100
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2015-12-10 11:21:13 +0100
commitea21c7610aa1131b37a4533cf13dd89f727fb83f (patch)
treeb4abed8aea3646aa2f3d15f56edecac64d1ac344 /libc/signal
parent7661046a31605024d5cd2ef4eed24d1774539d8b (diff)
fix tst-signal7 failure
error out on internal NPTL used signals.
Diffstat (limited to 'libc/signal')
-rw-r--r--libc/signal/sigaction.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libc/signal/sigaction.c b/libc/signal/sigaction.c
index 256064725..0a0299831 100644
--- a/libc/signal/sigaction.c
+++ b/libc/signal/sigaction.c
@@ -25,6 +25,11 @@
int
__libc_sigaction(int sig, const struct sigaction *act, struct sigaction *oact)
{
+ if (unlikely (sig == SIGCANCEL || sig == SIGSETXID)) {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
/* NB: kernel (as of 2.6.25) will return EINVAL
* if sizeof(act->sa_mask) does not match kernel's sizeof(sigset_t).
* Try to catch this problem at uclibc build time: */
@@ -48,6 +53,11 @@ __libc_sigaction(int sig, const struct sigaction *act, struct sigaction *oact)
int result;
struct old_kernel_sigaction kact, koact;
+ if (unlikely (sig == SIGCANCEL || sig == SIGSETXID)) {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
if (act) {
kact.k_sa_handler = act->sa_handler;
kact.sa_mask = act->sa_mask.__val[0];