summaryrefslogtreecommitdiff
path: root/regress/lib/libpthread/signal
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2001-11-11 23:26:36 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2001-11-11 23:26:36 +0000
commit854e32bfa0ac46bd779092588acc3ad83723617f (patch)
treeeb8c4c07328fbf5349c22f59ef1547c27bb5a29c /regress/lib/libpthread/signal
parent4907cd2837006c10a4de5ff099eea656e5a089b8 (diff)
signal race fixes
Diffstat (limited to 'regress/lib/libpthread/signal')
-rw-r--r--regress/lib/libpthread/signal/signal.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/regress/lib/libpthread/signal/signal.c b/regress/lib/libpthread/signal/signal.c
index 4955dd86f83..2d79cf2e08a 100644
--- a/regress/lib/libpthread/signal/signal.c
+++ b/regress/lib/libpthread/signal/signal.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: signal.c,v 1.2 2001/11/03 04:33:48 marc Exp $ */
+/* $OpenBSD: signal.c,v 1.3 2001/11/11 23:26:35 deraadt Exp $ */
/* David Leonard <d@openbsd.org>, 2001. Public Domain. */
/*
@@ -31,9 +31,12 @@ void
handler(sig)
int sig;
{
+ int save_errno = errno;
+
alarmed = 1;
alarm(1);
signal(SIGALRM, handler);
+ errno = save_errno;
}
int