diff options
author | Damien Miller <djm@mindrot.org> | 2000-09-30 14:17:52 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2000-09-30 14:17:52 +1100 |
commit | cf3888d396899f82a8ab1f60c6579cbc7887672c (patch) | |
tree | 05235eec3dbd4e77cf2565496e08934a05d3d6ec /serverloop.c | |
parent | b88532e38960cf3600591d92bc84e7d1cc21656f (diff) |
- (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>
Diffstat (limited to 'serverloop.c')
-rw-r--r-- | serverloop.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/serverloop.c b/serverloop.c index 50e89aee..8ee93b3b 100644 --- a/serverloop.c +++ b/serverloop.c @@ -417,6 +417,7 @@ server_loop(pid_t pid, int fdin_arg, int fdout_arg, int fderr_arg) 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 @@ server_loop2(void) 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(); |