- djm@cvs.openbsd.org 2004/09/07 23:41:30
     [clientloop.c ssh.c]
     cleanup multiplex control socket on SIGHUP too, spotted by sturm@
     ok markus@ deraadt@
diff --git a/ChangeLog b/ChangeLog
index 958724c..93a2d62 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,10 @@
      .Xsession -> .xsession;
      originally from a pr from f at obiit dot org, but missed by myself;
      ok markus@ matthieu@
+   - djm@cvs.openbsd.org 2004/09/07 23:41:30
+     [clientloop.c ssh.c]
+     cleanup multiplex control socket on SIGHUP too, spotted by sturm@
+     ok markus@ deraadt@
 
 20041102
  - (dtucker) [configure.ac includes.h] Bug #947: Fix compile error on HP-UX
@@ -1787,4 +1791,4 @@
    - (djm) Trim deprecated options from INSTALL. Mention UsePAM
    - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
 
-$Id: ChangeLog,v 1.3564 2004/11/05 09:01:03 dtucker Exp $
+$Id: ChangeLog,v 1.3565 2004/11/05 09:02:16 dtucker Exp $
diff --git a/clientloop.c b/clientloop.c
index 0b9a0fb..49f9ba1 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -59,7 +59,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: clientloop.c,v 1.130 2004/08/11 21:43:04 avsm Exp $");
+RCSID("$OpenBSD: clientloop.c,v 1.131 2004/09/07 23:41:30 djm Exp $");
 
 #include "ssh.h"
 #include "ssh1.h"
@@ -1196,6 +1196,8 @@
 	 * Set signal handlers, (e.g. to restore non-blocking mode)
 	 * but don't overwrite SIG_IGN, matches behaviour from rsh(1)
 	 */
+	if (signal(SIGHUP, SIG_IGN) != SIG_IGN)
+		signal(SIGHUP, signal_handler);
 	if (signal(SIGINT, SIG_IGN) != SIG_IGN)
 		signal(SIGINT, signal_handler);
 	if (signal(SIGQUIT, SIG_IGN) != SIG_IGN)
diff --git a/ssh.c b/ssh.c
index 6f0ba26..77f16c0 100644
--- a/ssh.c
+++ b/ssh.c
@@ -40,7 +40,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: ssh.c,v 1.225 2004/08/23 14:26:38 dtucker Exp $");
+RCSID("$OpenBSD: ssh.c,v 1.226 2004/09/07 23:41:30 djm Exp $");
 
 #include <openssl/evp.h>
 #include <openssl/err.h>
@@ -1325,6 +1325,7 @@
 		fatal("%s: master returned error", __func__);
 	buffer_free(&m);
 
+	signal(SIGHUP, control_client_sighandler);
 	signal(SIGINT, control_client_sighandler);
 	signal(SIGTERM, control_client_sighandler);
 	signal(SIGWINCH, control_client_sigrelay);