summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2001-01-16 23:34:42 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2001-01-16 23:34:42 +0000
commit3223931eb243edc321fa6c0701b801c11e91200b (patch)
tree9211aa4fd15a9262958aced91b633cbfb66d91ae
parent7faf1318897374381859487eec8bcdf012273a5c (diff)
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;
}