summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--serverloop.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 6b112b6c7..fa9b472ce 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
120000913
2 - (djm) Fix server not exiting with jobs in background.
3
120000905 420000905
2 - (djm) Import OpenBSD CVS changes 5 - (djm) Import OpenBSD CVS changes
3 - markus@cvs.openbsd.org 2000/08/31 15:52:24 6 - markus@cvs.openbsd.org 2000/08/31 15:52:24
diff --git a/serverloop.c b/serverloop.c
index 00617bb81..8c17c0d56 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -86,6 +86,7 @@ sigchld_handler2(int sig)
86 int save_errno = errno; 86 int save_errno = errno;
87 debug("Received SIGCHLD."); 87 debug("Received SIGCHLD.");
88 child_terminated = 1; 88 child_terminated = 1;
89 child_has_selected = 0;
89 errno = save_errno; 90 errno = save_errno;
90} 91}
91 92
@@ -652,6 +653,8 @@ server_loop2(void)
652 signal(SIGCHLD, sigchld_handler2); 653 signal(SIGCHLD, sigchld_handler2);
653 } 654 }
654 channel_after_select(&readset, &writeset); 655 channel_after_select(&readset, &writeset);
656 if (child_terminated && child_has_selected)
657 break;
655 process_input(&readset); 658 process_input(&readset);
656 process_output(&writeset); 659 process_output(&writeset);
657 } 660 }