Passes most test cases now

--HG--
branch : channel-fix
extra : convert_revision : 5a5f398411a7a3baa9472daa80fea0574fbd8a9a
This commit is contained in:
Matt Johnston
2006-10-09 16:31:00 +00:00
parent 786ea39ac4
commit cc340d9cdc
2 changed files with 14 additions and 30 deletions

View File

@@ -65,6 +65,11 @@ static void get_termmodes(struct ChanSess *chansess);
/* required to clear environment */
extern char** environ;
static int sesscheckclose(struct Channel *channel) {
struct ChanSess *chansess = (struct ChanSess*)channel->typedata;
return chansess->exit.exitpid != -1;
}
/* Handler for childs exiting, store the state for return to the client */
/* There's a particular race we have to watch out for: if the forked child
@@ -962,7 +967,7 @@ const struct ChanType svrchansess = {
0, /* sepfds */
"session", /* name */
newchansess, /* inithandler */
NULL, /* checkclosehandler */
sesscheckclose, /* checkclosehandler */
chansessionrequest, /* reqhandler */
closechansess, /* closehandler */
};