diff options
author | Damien Miller <djm@mindrot.org> | 2000-09-29 10:57:35 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2000-09-29 10:57:35 +1100 |
commit | 15e7d4b64c237243657742cb50fead1062bbb92e (patch) | |
tree | f5b553bd3e53586b62e71f8e8d96919ab1ac1f5e /serverloop.c | |
parent | ecf5830e8aff013f4274fafcfe77853749a69bf7 (diff) |
- (djm) Fix SSH2 not terminating until all background tasks done problem.
Diffstat (limited to 'serverloop.c')
-rw-r--r-- | serverloop.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/serverloop.c b/serverloop.c index be9edfaf..50e89aee 100644 --- a/serverloop.c +++ b/serverloop.c @@ -110,7 +110,6 @@ sigchld_handler2(int sig) int save_errno = errno; debug("Received SIGCHLD."); child_terminated = 1; - child_has_selected = 0; errno = save_errno; } @@ -675,10 +674,10 @@ server_loop2(void) session_close_by_pid(pid, status); child_terminated = 0; signal(SIGCHLD, sigchld_handler2); + if (used_sessions() == 0) + break; } channel_after_select(&readset, &writeset); - if (child_terminated && child_has_selected) - break; process_input(&readset); process_output(&writeset); } |