From cf3888d396899f82a8ab1f60c6579cbc7887672c Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Sat, 30 Sep 2000 14:17:52 +1100 Subject: - (djm) Ignore SIGPIPEs from serverloop to child. Fixes crashes with very short lived X connections. Bug report from Tobias Oetiker . Fix from Markus Friedl --- ChangeLog | 3 +++ serverloop.c | 2 ++ session.c | 2 ++ 3 files changed, 7 insertions(+) diff --git a/ChangeLog b/ChangeLog index 36d0116ca..50f959226 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,9 @@ - (djm) Support in bsd-snprintf.c for long long conversions from Ben Lindstrom - (djm) Cleanup NeXT support from Ben Lindstrom + - (djm) Ignore SIGPIPEs from serverloop to child. Fixes crashes with + very short lived X connections. Bug report from Tobias Oetiker + . Fix from Markus Friedl 20000929 - (djm) Fix SSH2 not terminating until all background tasks done problem. diff --git a/serverloop.c b/serverloop.c index 50e89aee8..8ee93b3b1 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(); diff --git a/session.c b/session.c index f5bbf19d4..d0172a369 100644 --- a/session.c +++ b/session.c @@ -477,6 +477,8 @@ do_exec_no_pty(Session *s, const char *command, struct passwd * pw) if (s == NULL) fatal("do_exec_no_pty: no session"); + signal(SIGPIPE, SIG_DFL); + session_proctitle(s); #ifdef USE_PAM -- cgit v1.2.3