summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/serverloop.c
diff options
context:
space:
mode:
authormarkus <markus@openbsd.org>2001-06-20 13:56:39 +0000
committermarkus <markus@openbsd.org>2001-06-20 13:56:39 +0000
commite1209187ab0d339f92d07309863759a1cfc14ff3 (patch)
treef706db995dc8b5fd5a54cf7ea9a55d4eb8475100 /usr.bin/ssh/serverloop.c
parentwe don't use "/" in the beginning of the name in MANSUBDIR (diff)
downloadwireguard-openbsd-e1209187ab0d339f92d07309863759a1cfc14ff3.tar.xz
wireguard-openbsd-e1209187ab0d339f92d07309863759a1cfc14ff3.zip
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