- (djm) Ignore SIGPIPEs from serverloop to child. Fixes crashes with
very short lived X connections. Bug report from Tobias Oetiker
<oetiker@ee.ethz.ch>. Fix from Markus Friedl <markus@cvs.openbsd.org>
diff --git a/serverloop.c b/serverloop.c
index 50e89ae..8ee93b3 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -417,6 +417,7 @@
child_terminated = 0;
child_has_selected = 0;
signal(SIGCHLD, sigchld_handler);
+ signal(SIGPIPE, SIG_IGN);
/* Initialize our global variables. */
fdin = fdin_arg;
@@ -650,6 +651,7 @@
debug("Entering interactive session for SSH2.");
signal(SIGCHLD, sigchld_handler2);
+ signal(SIGPIPE, SIG_IGN);
child_terminated = 0;
connection_in = packet_get_connection_in();
connection_out = packet_get_connection_out();