From 5c6e8b833eaa6ff63cf1394222abcbb48c78a400 Mon Sep 17 00:00:00 2001
From: Matt Johnston <matt@ucc.asn.au>
Date: Sun, 17 Oct 2004 08:19:47 +0000
Subject: [PATCH] Initialise the "lastexit" variable so that we don't get
 session channels terminating prematurely.

--HG--
extra : convert_revision : 5cb8d5a7c8fe405fa4d49906f66a61590ae4a087
---
 svr-chansession.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/svr-chansession.c b/svr-chansession.c
index c3356d66..f1e9c88c 100644
--- a/svr-chansession.c
+++ b/svr-chansession.c
@@ -960,6 +960,7 @@ void svr_chansessinitialise() {
 	svr_ses.childpids[0].pid = -1; /* unused */
 	svr_ses.childpids[0].chansess = NULL;
 	svr_ses.childpidsize = 1;
+	svr_ses.lastexit.exitpid = -1; /* Nothing has exited yet */
 	sa_chld.sa_handler = sesssigchild_handler;
 	sa_chld.sa_flags = SA_NOCLDSTOP;
 	if (sigaction(SIGCHLD, &sa_chld, NULL) < 0) {
-- 
GitLab