diff options
author | 2004-06-14 01:44:38 +0000 | |
---|---|---|
committer | 2004-06-14 01:44:38 +0000 | |
commit | ff3fa43926265cacf3dfcaee89f87eb6420bc5aa (patch) | |
tree | 423f16706bf81ca3ad443674872b80823f045b00 /usr.bin/ssh/ssh-keyscan.c | |
parent | sync (diff) | |
download | wireguard-openbsd-ff3fa43926265cacf3dfcaee89f87eb6420bc5aa.tar.xz wireguard-openbsd-ff3fa43926265cacf3dfcaee89f87eb6420bc5aa.zip |
set_nonblock() instead of fnctl(...,O_NONBLOCK); "looks sane" deraadt@
Diffstat (limited to 'usr.bin/ssh/ssh-keyscan.c')
-rw-r--r-- | usr.bin/ssh/ssh-keyscan.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/ssh/ssh-keyscan.c b/usr.bin/ssh/ssh-keyscan.c index 61107050797..9bb4134dbc1 100644 --- a/usr.bin/ssh/ssh-keyscan.c +++ b/usr.bin/ssh/ssh-keyscan.c @@ -7,7 +7,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-keyscan.c,v 1.48 2004/06/13 12:53:24 djm Exp $"); +RCSID("$OpenBSD: ssh-keyscan.c,v 1.49 2004/06/14 01:44:39 djm Exp $"); #include <sys/queue.h> #include <errno.h> @@ -384,8 +384,8 @@ tcpconnect(char *host) error("socket: %s", strerror(errno)); continue; } - if (fcntl(s, F_SETFL, O_NONBLOCK) < 0) - fatal("F_SETFL: %s", strerror(errno)); + if (set_nonblock(s) == -1) + fatal("%s: set_nonblock(%d)", __func__, s); if (connect(s, ai->ai_addr, ai->ai_addrlen) < 0 && errno != EINPROGRESS) error("connect (`%s'): %s", host, strerror(errno)); |