pthread_kill, pthread_sigmask: return errno, not the return from the system

call. Found by VSTHlite.
This commit is contained in:
ad 2008-06-24 13:45:07 +00:00
parent 60271c61c4
commit 6d153667e5

View File

@ -1,4 +1,4 @@
/* $NetBSD: pthread_misc.c,v 1.8 2008/04/28 20:23:01 martin Exp $ */
/* $NetBSD: pthread_misc.c,v 1.9 2008/06/24 13:45:07 ad Exp $ */
/*-
* Copyright (c) 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__RCSID("$NetBSD: pthread_misc.c,v 1.8 2008/04/28 20:23:01 martin Exp $");
__RCSID("$NetBSD: pthread_misc.c,v 1.9 2008/06/24 13:45:07 ad Exp $");
#include <errno.h>
#include <string.h>
@ -136,15 +136,18 @@ pthread_kill(pthread_t thread, int sig)
return EINVAL;
if (pthread__find(thread) != 0)
return ESRCH;
return _lwp_kill(thread->pt_lid, sig);
if (_lwp_kill(thread->pt_lid, sig))
return errno;
return 0;
}
int
pthread_sigmask(int how, const sigset_t *set, sigset_t *oset)
{
return _sys___sigprocmask14(how, set, oset);
if (_sys___sigprocmask14(how, set, oset))
return errno;
return 0;
}
int