summaryrefslogtreecommitdiffhomepage
path: root/svr-chansession.c
diff options
context:
space:
mode:
Diffstat (limited to 'svr-chansession.c')
-rw-r--r--svr-chansession.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/svr-chansession.c b/svr-chansession.c
index ea23fd3..99a67e9 100644
--- a/svr-chansession.c
+++ b/svr-chansession.c
@@ -59,7 +59,6 @@ static void send_msg_chansess_exitstatus(struct Channel * channel,
struct ChanSess * chansess);
static void send_msg_chansess_exitsignal(struct Channel * channel,
struct ChanSess * chansess);
-static int sesscheckclose(struct Channel *channel);
static void get_termmodes(struct ChanSess *chansess);
@@ -67,7 +66,8 @@ static void get_termmodes(struct ChanSess *chansess);
extern char** environ;
static int sesscheckclose(struct Channel *channel) {
- return channel->writefd == -1;
+ struct ChanSess *chansess = (struct ChanSess*)channel->typedata;
+ return chansess->exit.exitpid != -1;
}
/* Handler for childs exiting, store the state for return to the client */