diff options
Diffstat (limited to 'libc')
-rw-r--r-- | libc/bionic/pthread.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libc/bionic/pthread.c b/libc/bionic/pthread.c index ec3c459..f2d9cb3 100644 --- a/libc/bionic/pthread.c +++ b/libc/bionic/pthread.c @@ -1538,7 +1538,11 @@ int pthread_kill(pthread_t tid, int sig) int old_errno = errno; pthread_internal_t * thread = (pthread_internal_t *)tid; + if (!thread) + return ESRCH; + ret = tkill(thread->kernel_id, sig); + if (ret < 0) { ret = errno; errno = old_errno; |