Mercurial > dropbear
diff svr-chansession.c @ 108:10f4d3319780
- added circular buffering for channels
- added stderr support for the client
- cleaned up a bunch of "unused" warnings, duplicated header definitions
- added exit-status support for the client
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 26 Aug 2004 13:16:40 +0000 |
parents | b8e36c1a5520 |
children | 2e9d1f29c50f |
line wrap: on
line diff
--- a/svr-chansession.c Tue Aug 24 18:12:18 2004 +0000 +++ b/svr-chansession.c Thu Aug 26 13:16:40 2004 +0000 @@ -55,6 +55,10 @@ static void chansessionrequest(struct Channel *channel); static void send_exitsignalstatus(struct Channel *channel); +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); @@ -68,7 +72,7 @@ } /* handler for childs exiting, store the state for return to the client */ -static void sesssigchild_handler(int dummy) { +static void sesssigchild_handler(int UNUSED(dummy)) { int status; pid_t pid; @@ -498,7 +502,9 @@ } /* allocate the pty */ - assert(chansess->master == -1); /* haven't already got one */ + if (chansess->master != -1) { + dropbear_exit("multiple pty requests"); + } if (pty_allocate(&chansess->master, &chansess->slave, namebuf, 64) == 0) { TRACE(("leave sessionpty: failed to allocate pty")); return DROPBEAR_FAILURE;