summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/serverloop.c
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2001-06-20 13:56:40 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2001-06-20 13:56:40 +0000
commit18ae7ab7dc9ced79f85181e62ffcf3073a2f6204 (patch)
tree5b1ddb76e01af7eb476fbb1773a3132d8d0d28a5 /usr.bin/ssh/serverloop.c
parent6953e205cb524fbc2f8701f24223329d04a88141 (diff)
move from channel_stop_listening to channel_free_all,
call channel_free_all before calling waitpid() in serverloop. fixes the utmp handling; report from Lutz.Jaenicke@aet.TU-Cottbus.DE
Diffstat (limited to 'usr.bin/ssh/serverloop.c')
-rw-r--r--usr.bin/ssh/serverloop.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/ssh/serverloop.c b/usr.bin/ssh/serverloop.c
index 0c963f071a6..a5d0c58ae97 100644
--- a/usr.bin/ssh/serverloop.c
+++ b/usr.bin/ssh/serverloop.c
@@ -35,7 +35,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: serverloop.c,v 1.68 2001/06/04 23:07:20 markus Exp $");
+RCSID("$OpenBSD: serverloop.c,v 1.69 2001/06/20 13:56:39 markus Exp $");
#include "xmalloc.h"
#include "packet.h"
@@ -608,8 +608,7 @@ server_loop(pid_t pid, int fdin_arg, int fdout_arg, int fderr_arg)
close(fdin);
fdin = -1;
- /* Stop listening for channels; this removes unix domain sockets. */
- channel_stop_listening();
+ channel_free_all();
/* We no longer want our SIGCHLD handler to be called. */
signal(SIGCHLD, SIG_DFL);
@@ -700,10 +699,11 @@ server_loop2(void)
if (writeset)
xfree(writeset);
+ channel_free_all();
+
signal(SIGCHLD, SIG_DFL);
while ((pid = waitpid(-1, &status, WNOHANG)) > 0)
session_close_by_pid(pid, status);
- channel_stop_listening();
}
void