- deraadt@cvs.openbsd.org 2001/11/14 20:45:08
[sshd.c]
errno saving wrapping in a signal handler
diff --git a/sshd.c b/sshd.c
index 71a5c2c..f81597f 100644
--- a/sshd.c
+++ b/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>
@@ -211,8 +211,11 @@
static void
sighup_handler(int sig)
{
+ int save_errno = errno;
+
received_sighup = 1;
signal(SIGHUP, sighup_handler);
+ errno = save_errno;
}
/*