From 0795848def0a66570eb724b93377bc839df33512 Mon Sep 17 00:00:00 2001 From: Ben Lindstrom Date: Thu, 6 Dec 2001 16:19:01 +0000 Subject: - deraadt@cvs.openbsd.org 2001/11/14 20:45:08 [sshd.c] errno saving wrapping in a signal handler --- sshd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sshd.c') diff --git a/sshd.c b/sshd.c index 71a5c2c2e..f81597f1d 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 #include @@ -211,8 +211,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; } /* -- cgit v1.2.3