diff options
author | 2002-10-09 03:02:33 +0000 | |
---|---|---|
committer | 2002-10-09 03:02:33 +0000 | |
commit | 477a56a00f8f216cf8c0c07717d3ba62f9e20659 (patch) | |
tree | bd4fbc3ce0b67845b4652810d39202283620c328 | |
parent | fix two incorrect L<> calls; ok millert@ (diff) | |
download | wireguard-openbsd-477a56a00f8f216cf8c0c07717d3ba62f9e20659.tar.xz wireguard-openbsd-477a56a00f8f216cf8c0c07717d3ba62f9e20659.zip |
clean-up. check that SA_RESETHAND does the right thing, too.
full library support for this is still pending.
-rw-r--r-- | regress/lib/libc_r/siginfo/siginfo.c | 9 | ||||
-rw-r--r-- | regress/lib/libpthread/siginfo/siginfo.c | 9 |
2 files changed, 14 insertions, 4 deletions
diff --git a/regress/lib/libc_r/siginfo/siginfo.c b/regress/lib/libc_r/siginfo/siginfo.c index ce3f1f94c51..a280072a6c5 100644 --- a/regress/lib/libc_r/siginfo/siginfo.c +++ b/regress/lib/libc_r/siginfo/siginfo.c @@ -1,7 +1,8 @@ -/* $OpenBSD: siginfo.c,v 1.3 2002/10/07 22:49:42 marc Exp $ */ +/* $OpenBSD: siginfo.c,v 1.4 2002/10/09 03:02:33 marc Exp $ */ /* PUBLIC DOMAIN Oct 2002 <marc@snafu.org> */ -/* test SA_SIGINFO support */ +/* test SA_SIGINFO support. Also check that SA_RESETHAND does the right + thing. */ #include <assert.h> #include <signal.h> @@ -12,6 +13,10 @@ void act_handler(int signal, siginfo_t *siginfo, void *context) { + struct sigaction sa; + + CHECKe(sigaction(SIGSEGV, NULL, &sa)); + ASSERT(sa.sa_handler == SIG_DFL); ASSERT(siginfo != NULL); ASSERT(siginfo->si_addr == (char *) 0x987234 && siginfo->si_code == 1 && siginfo->si_trapno == 2); diff --git a/regress/lib/libpthread/siginfo/siginfo.c b/regress/lib/libpthread/siginfo/siginfo.c index ce3f1f94c51..a280072a6c5 100644 --- a/regress/lib/libpthread/siginfo/siginfo.c +++ b/regress/lib/libpthread/siginfo/siginfo.c @@ -1,7 +1,8 @@ -/* $OpenBSD: siginfo.c,v 1.3 2002/10/07 22:49:42 marc Exp $ */ +/* $OpenBSD: siginfo.c,v 1.4 2002/10/09 03:02:33 marc Exp $ */ /* PUBLIC DOMAIN Oct 2002 <marc@snafu.org> */ -/* test SA_SIGINFO support */ +/* test SA_SIGINFO support. Also check that SA_RESETHAND does the right + thing. */ #include <assert.h> #include <signal.h> @@ -12,6 +13,10 @@ void act_handler(int signal, siginfo_t *siginfo, void *context) { + struct sigaction sa; + + CHECKe(sigaction(SIGSEGV, NULL, &sa)); + ASSERT(sa.sa_handler == SIG_DFL); ASSERT(siginfo != NULL); ASSERT(siginfo->si_addr == (char *) 0x987234 && siginfo->si_code == 1 && siginfo->si_trapno == 2); |