summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2001-01-16 23:34:41 +0000
committerderaadt <deraadt@openbsd.org>2001-01-16 23:34:41 +0000
commitc0e9b3411211455b6fd14e0c5c6789b084084831 (patch)
treebac8f257bff4be7ae74560a3dbf3a827c18a5db2
parentuse _exit() in signal handler (diff)
downloadwireguard-openbsd-c0e9b3411211455b6fd14e0c5c6789b084084831.tar.xz
wireguard-openbsd-c0e9b3411211455b6fd14e0c5c6789b084084831.zip
save_errno in signal handler, in case it calls signal()
-rw-r--r--usr.sbin/bootpd/bootpd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/bootpd/bootpd.c b/usr.sbin/bootpd/bootpd.c
index 393b5f378dc..8f19436789c 100644
--- a/usr.sbin/bootpd/bootpd.c
+++ b/usr.sbin/bootpd/bootpd.c
@@ -21,7 +21,7 @@ SOFTWARE.
************************************************************************/
#ifndef lint
-static char rcsid[] = "$Id: bootpd.c,v 1.8 1998/12/20 21:16:49 millert Exp $";
+static char rcsid[] = "$Id: bootpd.c,v 1.9 2001/01/16 23:34:41 deraadt Exp $";
#endif
/*
@@ -576,6 +576,8 @@ PRIVATE void
catcher(sig)
int sig;
{
+ int save_errno = errno;
+
if (sig == SIGHUP)
do_readtab = 1;
if (sig == SIGUSR1)
@@ -585,6 +587,7 @@ catcher(sig)
/* XXX - Should just do it the POSIX way (sigaction). */
signal(sig, catcher);
#endif
+ save_errno = errno;
}