diff options
author | Philip Guenthe <guenther@cvs.openbsd.org> | 2012-02-20 01:49:10 +0000 |
---|---|---|
committer | Philip Guenthe <guenther@cvs.openbsd.org> | 2012-02-20 01:49:10 +0000 |
commit | df6bb9a4b20e6249b103569412b042a76feb8a24 (patch) | |
tree | 48468822c73d9764348083cbc3b9bea40fe7a6fd /regress/lib/libpthread | |
parent | b6f8e48110a73a51ff7a771692e2ff6ba2e51e2e (diff) |
pthread_sigmask() was fixed to return the errno value on failure
Diffstat (limited to 'regress/lib/libpthread')
-rw-r--r-- | regress/lib/libpthread/sigmask/sigmask.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/regress/lib/libpthread/sigmask/sigmask.c b/regress/lib/libpthread/sigmask/sigmask.c index f77fcc4646d..52cff5d02d0 100644 --- a/regress/lib/libpthread/sigmask/sigmask.c +++ b/regress/lib/libpthread/sigmask/sigmask.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sigmask.c,v 1.4 2011/10/01 11:00:38 fgsch Exp $ */ +/* $OpenBSD: sigmask.c,v 1.5 2012/02/20 01:49:09 guenther Exp $ */ /* PUBLIC DOMAIN July 2003 Marco S Hyman <marc@snafu.org> */ #include <sys/time.h> @@ -17,6 +17,7 @@ int main (int argc, char *argv[]) { sigset_t mask; int sig; + int r; /* any two (or more) command line args should cause the program to die */ @@ -32,7 +33,8 @@ int main (int argc, char *argv[]) CHECKr(pthread_sigmask(SIG_BLOCK, &mask, NULL)); /* make sure pthread_sigmask() returns the right value on failure */ - CHECKr(pthread_sigmask(-1, &mask, NULL)); + r = pthread_sigmask(-1, &mask, NULL); + ASSERTe(r, == EINVAL); /* now trigger sigalrm and wait for it */ printf("trigger sigalrm[2] [masked, test should not die]\n"); |