summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarc <marc@openbsd.org>2002-10-07 22:17:07 +0000
committermarc <marc@openbsd.org>2002-10-07 22:17:07 +0000
commit404bcbbdd73e56f0d9b60aea260b7f9c6654b998 (patch)
treef7aaac6f5e8bcd3889620a4d77efda8da3f0c1a3
parent.Xr ipcs 1 (diff)
downloadwireguard-openbsd-404bcbbdd73e56f0d9b60aea260b7f9c6654b998.tar.xz
wireguard-openbsd-404bcbbdd73e56f0d9b60aea260b7f9c6654b998.zip
use/check SA_RESETHAND, too.
Note: until SA_RESETHAND support is fixed the test loops on SIGSEGV
-rw-r--r--regress/lib/libc_r/siginfo/siginfo.c7
-rw-r--r--regress/lib/libpthread/siginfo/siginfo.c7
2 files changed, 8 insertions, 6 deletions
diff --git a/regress/lib/libc_r/siginfo/siginfo.c b/regress/lib/libc_r/siginfo/siginfo.c
index ab1fb62aac0..605dac9a33e 100644
--- a/regress/lib/libc_r/siginfo/siginfo.c
+++ b/regress/lib/libc_r/siginfo/siginfo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: siginfo.c,v 1.1 2002/10/07 21:27:16 marc Exp $ */
+/* $OpenBSD: siginfo.c,v 1.2 2002/10/07 22:17:07 marc Exp $ */
/* PUBLIC DOMAIN Oct 2002 <marc@snafu.org> */
/* test SA_SIGINFO support */
@@ -12,7 +12,8 @@
void
act_handler(int signal, siginfo_t *siginfo, void *context)
{
- ASSERT(siginfo && siginfo->si_addr == (char *) 0x987234 &&
+ ASSERT(siginfo);
+ ASSERT(siginfo->si_addr == (char *) 0x987234 &&
siginfo->si_code == 1 && siginfo->si_trapno == 2);
}
@@ -23,7 +24,7 @@ main(int argc, char **argv)
act.sa_sigaction = act_handler;
sigemptyset(&act.sa_mask);
- act.sa_flags = SA_SIGINFO;
+ act.sa_flags = SA_SIGINFO | SA_RESETHAND;
CHECKe(sigaction(SIGSEGV, &act, NULL));
*(char *) 0x987234 = 1;
SUCCEED;
diff --git a/regress/lib/libpthread/siginfo/siginfo.c b/regress/lib/libpthread/siginfo/siginfo.c
index ab1fb62aac0..605dac9a33e 100644
--- a/regress/lib/libpthread/siginfo/siginfo.c
+++ b/regress/lib/libpthread/siginfo/siginfo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: siginfo.c,v 1.1 2002/10/07 21:27:16 marc Exp $ */
+/* $OpenBSD: siginfo.c,v 1.2 2002/10/07 22:17:07 marc Exp $ */
/* PUBLIC DOMAIN Oct 2002 <marc@snafu.org> */
/* test SA_SIGINFO support */
@@ -12,7 +12,8 @@
void
act_handler(int signal, siginfo_t *siginfo, void *context)
{
- ASSERT(siginfo && siginfo->si_addr == (char *) 0x987234 &&
+ ASSERT(siginfo);
+ ASSERT(siginfo->si_addr == (char *) 0x987234 &&
siginfo->si_code == 1 && siginfo->si_trapno == 2);
}
@@ -23,7 +24,7 @@ main(int argc, char **argv)
act.sa_sigaction = act_handler;
sigemptyset(&act.sa_mask);
- act.sa_flags = SA_SIGINFO;
+ act.sa_flags = SA_SIGINFO | SA_RESETHAND;
CHECKe(sigaction(SIGSEGV, &act, NULL));
*(char *) 0x987234 = 1;
SUCCEED;