summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-09-30 14:17:52 +1100
committerDamien Miller <djm@mindrot.org>2000-09-30 14:17:52 +1100
commitcf3888d396899f82a8ab1f60c6579cbc7887672c (patch)
tree05235eec3dbd4e77cf2565496e08934a05d3d6ec
parentb88532e38960cf3600591d92bc84e7d1cc21656f (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>
-rw-r--r--ChangeLog3
-rw-r--r--serverloop.c2
-rw-r--r--session.c2
3 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 36d0116ca..50f959226 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,9 @@
3 - (djm) Support in bsd-snprintf.c for long long conversions from 3 - (djm) Support in bsd-snprintf.c for long long conversions from
4 Ben Lindstrom <mouring@pconline.com> 4 Ben Lindstrom <mouring@pconline.com>
5 - (djm) Cleanup NeXT support from Ben Lindstrom <mouring@pconline.com> 5 - (djm) Cleanup NeXT support from Ben Lindstrom <mouring@pconline.com>
6 - (djm) Ignore SIGPIPEs from serverloop to child. Fixes crashes with
7 very short lived X connections. Bug report from Tobias Oetiker
8 <oetiker@ee.ethz.ch>. Fix from Markus Friedl <markus@cvs.openbsd.org>
6 9
720000929 1020000929
8 - (djm) Fix SSH2 not terminating until all background tasks done problem. 11 - (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)
417 child_terminated = 0; 417 child_terminated = 0;
418 child_has_selected = 0; 418 child_has_selected = 0;
419 signal(SIGCHLD, sigchld_handler); 419 signal(SIGCHLD, sigchld_handler);
420 signal(SIGPIPE, SIG_IGN);
420 421
421 /* Initialize our global variables. */ 422 /* Initialize our global variables. */
422 fdin = fdin_arg; 423 fdin = fdin_arg;
@@ -650,6 +651,7 @@ server_loop2(void)
650 debug("Entering interactive session for SSH2."); 651 debug("Entering interactive session for SSH2.");
651 652
652 signal(SIGCHLD, sigchld_handler2); 653 signal(SIGCHLD, sigchld_handler2);
654 signal(SIGPIPE, SIG_IGN);
653 child_terminated = 0; 655 child_terminated = 0;
654 connection_in = packet_get_connection_in(); 656 connection_in = packet_get_connection_in();
655 connection_out = packet_get_connection_out(); 657 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)
477 if (s == NULL) 477 if (s == NULL)
478 fatal("do_exec_no_pty: no session"); 478 fatal("do_exec_no_pty: no session");
479 479
480 signal(SIGPIPE, SIG_DFL);
481
480 session_proctitle(s); 482 session_proctitle(s);
481 483
482#ifdef USE_PAM 484#ifdef USE_PAM