summaryrefslogtreecommitdiffhomepage
path: root/svr-chansession.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2004-08-27 14:39:01 +0000
committerMatt Johnston <matt@ucc.asn.au>2004-08-27 14:39:01 +0000
commit69282617fd9c40395d57edf0ed6587def6131de7 (patch)
tree193af27642c02413e0d25619897554a664bb58f9 /svr-chansession.c
parent51a74b47995cfe24ef190b7e254f768eb92735f5 (diff)
merge of 50be59810e462f9f44f55e421227d6aa0b31982b
and 69b007796063cb5f042be7cca2d479e90db869c3 --HG-- extra : convert_revision : 5d0dfaa8c0ee6c728a3b4f0f0855199ba729db83
Diffstat (limited to 'svr-chansession.c')
-rw-r--r--svr-chansession.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/svr-chansession.c b/svr-chansession.c
index 8c9fa3b..be6678d 100644
--- a/svr-chansession.c
+++ b/svr-chansession.c
@@ -651,11 +651,10 @@ static int noptycommand(struct Channel *channel, struct ChanSess *chansess) {
ses.maxfd = MAX(ses.maxfd, channel->outfd);
ses.maxfd = MAX(ses.maxfd, channel->errfd);
- if ((fcntl(channel->outfd, F_SETFL, O_NONBLOCK) < 0) ||
- (fcntl(channel->infd, F_SETFL, O_NONBLOCK) < 0) ||
- (fcntl(channel->errfd, F_SETFL, O_NONBLOCK) < 0)) {
- dropbear_exit("Couldn't set nonblocking");
- }
+ setnonblocking(channel->outfd);
+ setnonblocking(channel->infd);
+ setnonblocking(channel->errfd);
+
}
#undef FDIN
#undef FDOUT
@@ -761,9 +760,7 @@ static int ptycommand(struct Channel *channel, struct ChanSess *chansess) {
/* don't need to set stderr here */
ses.maxfd = MAX(ses.maxfd, chansess->master);
- if (fcntl(chansess->master, F_SETFL, O_NONBLOCK) < 0) {
- dropbear_exit("Couldn't set nonblocking");
- }
+ setnonblocking(chansess->master);
}