From 69282617fd9c40395d57edf0ed6587def6131de7 Mon Sep 17 00:00:00 2001 From: Matt Johnston Date: Fri, 27 Aug 2004 14:39:01 +0000 Subject: merge of 50be59810e462f9f44f55e421227d6aa0b31982b and 69b007796063cb5f042be7cca2d479e90db869c3 --HG-- extra : convert_revision : 5d0dfaa8c0ee6c728a3b4f0f0855199ba729db83 --- svr-chansession.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'svr-chansession.c') 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); } -- cgit v1.2.3