summaryrefslogtreecommitdiff
path: root/signal.c
diff options
context:
space:
mode:
Diffstat (limited to 'signal.c')
-rw-r--r--signal.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/signal.c b/signal.c
index db0feec..f944e0b 100644
--- a/signal.c
+++ b/signal.c
@@ -35,6 +35,11 @@ pthread_sigmask(int how, sigset_t const *set, sigset_t *oset)
{
pthread_t thread = pthread_self();
+ if (thread == NULL)
+ {
+ return ENOENT;
+ }
+
/* Validate the `how' argument.*/
if (set != NULL)
{