aboutsummaryrefslogtreecommitdiff
path: root/crypto/openssh/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssh/util.c')
-rw-r--r--crypto/openssh/util.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/crypto/openssh/util.c b/crypto/openssh/util.c
index 71808f14ddb2..1a591a6f0f51 100644
--- a/crypto/openssh/util.c
+++ b/crypto/openssh/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.5 2000/09/07 20:27:55 deraadt Exp $ */
+/* $OpenBSD: util.c,v 1.6 2000/10/27 07:32:19 markus Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
@@ -25,7 +25,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: util.c,v 1.5 2000/09/07 20:27:55 deraadt Exp $");
+RCSID("$OpenBSD: util.c,v 1.6 2000/10/27 07:32:19 markus Exp $");
#include "ssh.h"
@@ -48,18 +48,15 @@ void
set_nonblock(int fd)
{
int val;
- if (isatty(fd)) {
- /* do not mess with tty's */
- debug("no set_nonblock for tty fd %d", fd);
- return;
- }
val = fcntl(fd, F_GETFL, 0);
if (val < 0) {
error("fcntl(%d, F_GETFL, 0): %s", fd, strerror(errno));
return;
}
- if (val & O_NONBLOCK)
+ if (val & O_NONBLOCK) {
+ debug("fd %d IS O_NONBLOCK", fd);
return;
+ }
debug("fd %d setting O_NONBLOCK", fd);
val |= O_NONBLOCK;
if (fcntl(fd, F_SETFL, val) == -1)