summary refs log tree commit diff
path: root/sysdeps/posix/signal.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/posix/signal.c')
-rw-r--r--sysdeps/posix/signal.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sysdeps/posix/signal.c b/sysdeps/posix/signal.c
index a4a0875ae5..8a135c7b0e 100644
--- a/sysdeps/posix/signal.c
+++ b/sysdeps/posix/signal.c
@@ -18,8 +18,8 @@
 
 #include <errno.h>
 #include <signal.h>
-#include <string.h>	/* For the real memset prototype.  */
 #include <sigsetops.h>
+#include <internal-signals.h>
 
 sigset_t _sigintr attribute_hidden;		/* Set by siginterrupt.  */
 
@@ -31,7 +31,8 @@ __bsd_signal (int sig, __sighandler_t handler)
   struct sigaction act, oact;
 
   /* Check signal extents to protect __sigismember.  */
-  if (handler == SIG_ERR || sig < 1 || sig >= NSIG)
+  if (handler == SIG_ERR || sig < 1 || sig >= NSIG
+      || __is_internal_signal (sig))
     {
       __set_errno (EINVAL);
       return SIG_ERR;