diff options
author | Damien Miller <djm@mindrot.org> | 2000-09-13 10:43:26 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2000-09-13 10:43:26 +1100 |
commit | f384c366d33cb435627743f7ea0ed3f966543d40 (patch) | |
tree | 70aeb21714ae4b80454c4ee6e08e93117cec3387 /serverloop.c | |
parent | bac2d8aa5e642a70045e713853b13d020b9c5d57 (diff) |
- (djm) Fix server not exiting with jobs in background.
Diffstat (limited to 'serverloop.c')
-rw-r--r-- | serverloop.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/serverloop.c b/serverloop.c index 00617bb8..8c17c0d5 100644 --- a/serverloop.c +++ b/serverloop.c @@ -86,6 +86,7 @@ sigchld_handler2(int sig) int save_errno = errno; debug("Received SIGCHLD."); child_terminated = 1; + child_has_selected = 0; errno = save_errno; } @@ -652,6 +653,8 @@ server_loop2(void) signal(SIGCHLD, sigchld_handler2); } channel_after_select(&readset, &writeset); + if (child_terminated && child_has_selected) + break; process_input(&readset); process_output(&writeset); } |