summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/channels.c
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2000-05-17 08:20:17 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2000-05-17 08:20:17 +0000
commitf52cd8d3171054eccbebe0630a19752f1272eb1b (patch)
treee7816e6e9410f346e6e330da1ba8da205406cc58 /usr.bin/ssh/channels.c
parent9ec00b9fdfe93fe410f6932f84033553e51b74e2 (diff)
enable nonblocking IO for sshd w/ proto 1, too; split out common code
Diffstat (limited to 'usr.bin/ssh/channels.c')
-rw-r--r--usr.bin/ssh/channels.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/usr.bin/ssh/channels.c b/usr.bin/ssh/channels.c
index 5bf1e5b7aea..f7f21731bcb 100644
--- a/usr.bin/ssh/channels.c
+++ b/usr.bin/ssh/channels.c
@@ -17,7 +17,7 @@
*/
#include "includes.h"
-RCSID("$Id: channels.c,v 1.57 2000/05/08 17:42:24 markus Exp $");
+RCSID("$Id: channels.c,v 1.58 2000/05/17 08:20:15 markus Exp $");
#include "ssh.h"
#include "packet.h"
@@ -147,23 +147,6 @@ channel_lookup(int id)
return c;
}
-void
-set_nonblock(int fd)
-{
- int val;
- val = fcntl(fd, F_GETFL, 0);
- if (val < 0) {
- error("fcntl(%d, F_GETFL, 0): %s", fd, strerror(errno));
- return;
- }
- if (val & O_NONBLOCK)
- return;
- debug("fd %d setting O_NONBLOCK", fd);
- val |= O_NONBLOCK;
- if (fcntl(fd, F_SETFL, val) == -1)
- error("fcntl(%d, F_SETFL, O_NONBLOCK): %s", fd, strerror(errno));
-}
-
/*
* Register filedescriptors for a channel, used when allocating a channel or
* when the channel consumer/producer is ready, e.g. shell exec'd