diff options
Diffstat (limited to 'serverloop.c')
-rw-r--r-- | serverloop.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/serverloop.c b/serverloop.c index bafbfb0ac..1ce6c9106 100644 --- a/serverloop.c +++ b/serverloop.c | |||
@@ -35,7 +35,7 @@ | |||
35 | */ | 35 | */ |
36 | 36 | ||
37 | #include "includes.h" | 37 | #include "includes.h" |
38 | RCSID("$OpenBSD: serverloop.c,v 1.68 2001/06/04 23:07:20 markus Exp $"); | 38 | RCSID("$OpenBSD: serverloop.c,v 1.69 2001/06/20 13:56:39 markus Exp $"); |
39 | 39 | ||
40 | #include "xmalloc.h" | 40 | #include "xmalloc.h" |
41 | #include "packet.h" | 41 | #include "packet.h" |
@@ -608,8 +608,7 @@ server_loop(pid_t pid, int fdin_arg, int fdout_arg, int fderr_arg) | |||
608 | close(fdin); | 608 | close(fdin); |
609 | fdin = -1; | 609 | fdin = -1; |
610 | 610 | ||
611 | /* Stop listening for channels; this removes unix domain sockets. */ | 611 | channel_free_all(); |
612 | channel_stop_listening(); | ||
613 | 612 | ||
614 | /* We no longer want our SIGCHLD handler to be called. */ | 613 | /* We no longer want our SIGCHLD handler to be called. */ |
615 | signal(SIGCHLD, SIG_DFL); | 614 | signal(SIGCHLD, SIG_DFL); |
@@ -700,10 +699,11 @@ server_loop2(void) | |||
700 | if (writeset) | 699 | if (writeset) |
701 | xfree(writeset); | 700 | xfree(writeset); |
702 | 701 | ||
702 | channel_free_all(); | ||
703 | |||
703 | signal(SIGCHLD, SIG_DFL); | 704 | signal(SIGCHLD, SIG_DFL); |
704 | while ((pid = waitpid(-1, &status, WNOHANG)) > 0) | 705 | while ((pid = waitpid(-1, &status, WNOHANG)) > 0) |
705 | session_close_by_pid(pid, status); | 706 | session_close_by_pid(pid, status); |
706 | channel_stop_listening(); | ||
707 | } | 707 | } |
708 | 708 | ||
709 | void | 709 | void |