summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2001-11-14 20:45:09 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2001-11-14 20:45:09 +0000
commit4a42c58cde8d4a3d7b1425fd7812b76e445ba54d (patch)
treeae161ecb0d99e2bd6319bdcd83c31c46ecfad47d
parentd50677622fa2f91b853b28b095fcb9ac2f23a438 (diff)
errno saving wrapping in a signal handler
-rw-r--r--usr.bin/ssh/sshd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c
index f45a1d5d20e..5746287e917 100644
--- a/usr.bin/ssh/sshd.c
+++ b/usr.bin/ssh/sshd.c
@@ -40,7 +40,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: sshd.c,v 1.209 2001/11/10 13:19:45 markus Exp $");
+RCSID("$OpenBSD: sshd.c,v 1.210 2001/11/14 20:45:08 deraadt Exp $");
#include <openssl/dh.h>
#include <openssl/bn.h>
@@ -202,8 +202,11 @@ close_listen_socks(void)
static void
sighup_handler(int sig)
{
+ int save_errno = errno;
+
received_sighup = 1;
signal(SIGHUP, sighup_handler);
+ errno = save_errno;
}
/*