summaryrefslogtreecommitdiff
path: root/serverloop.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-07-04 05:26:06 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-07-04 05:26:06 +0000
commit809744e9125bb96c7115922bf747dc88c60a199e (patch)
tree035d4463a602c130e058348e20552da1af469c09 /serverloop.c
parent0047764526a5abcadc5cad7fe00d244e0dc47f75 (diff)
- markus@cvs.openbsd.org 2001/07/02 22:52:57
[channels.c channels.h serverloop.c] improve cleanup/exit logic in ssh2: stop listening to channels, detach channel users (e.g. sessions). wait for children (i.e. dying sessions), send exit messages, cleanup all channels.
Diffstat (limited to 'serverloop.c')
-rw-r--r--serverloop.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/serverloop.c b/serverloop.c
index 773292a94..1db1c725a 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -35,7 +35,7 @@
35 */ 35 */
36 36
37#include "includes.h" 37#include "includes.h"
38RCSID("$OpenBSD: serverloop.c,v 1.73 2001/07/02 13:59:14 markus Exp $"); 38RCSID("$OpenBSD: serverloop.c,v 1.74 2001/07/02 22:52:57 markus Exp $");
39 39
40#include "xmalloc.h" 40#include "xmalloc.h"
41#include "packet.h" 41#include "packet.h"
@@ -711,7 +711,8 @@ server_loop2(Authctxt *authctxt)
711 * there is a race between channel_free_all() killing children and 711 * there is a race between channel_free_all() killing children and
712 * children dying before kill() 712 * children dying before kill()
713 */ 713 */
714 channel_free_all(); 714 channel_detach_all();
715 channel_stop_listening();
715 716
716 while (session_have_children()) { 717 while (session_have_children()) {
717 pid = waitpid(-1, &status, 0); 718 pid = waitpid(-1, &status, 0);
@@ -722,6 +723,7 @@ server_loop2(Authctxt *authctxt)
722 break; 723 break;
723 } 724 }
724 } 725 }
726 channel_free_all();
725} 727}
726 728
727static void 729static void