summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--misc.c14
2 files changed, 11 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 5980ccf65..d9c50409e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -40,6 +40,10 @@
40 thanks to wilfried@ 40 thanks to wilfried@
41 - markus@cvs.openbsd.org 2002/03/04 12:43:06 41 - markus@cvs.openbsd.org 2002/03/04 12:43:06
42 [auth-passwd.c auth-rh-rsa.c auth-rhosts.c] 42 [auth-passwd.c auth-rh-rsa.c auth-rhosts.c]
43 - markus@cvs.openbsd.org 2002/03/04 13:10:46
44 [misc.c]
45 error-> debug, because O_NONBLOCK for /dev/null causes too many different
46 errnos; ok stevesk@, deraadt@
43 unused include 47 unused include
44 48
4520020226 4920020226
@@ -7772,4 +7776,4 @@
7772 - Wrote replacements for strlcpy and mkdtemp 7776 - Wrote replacements for strlcpy and mkdtemp
7773 - Released 1.0pre1 7777 - Released 1.0pre1
7774 7778
7775$Id: ChangeLog,v 1.1902 2002/03/05 01:45:56 mouring Exp $ 7779$Id: ChangeLog,v 1.1903 2002/03/05 01:48:09 mouring Exp $
diff --git a/misc.c b/misc.c
index 46cc43198..9e5a5aba6 100644
--- a/misc.c
+++ b/misc.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: misc.c,v 1.17 2002/02/26 20:03:51 stevesk Exp $ */ 1/* $OpenBSD: misc.c,v 1.18 2002/03/04 13:10:46 markus Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000 Markus Friedl. All rights reserved. 4 * Copyright (c) 2000 Markus Friedl. All rights reserved.
@@ -25,7 +25,7 @@
25 */ 25 */
26 26
27#include "includes.h" 27#include "includes.h"
28RCSID("$OpenBSD: misc.c,v 1.17 2002/02/26 20:03:51 stevesk Exp $"); 28RCSID("$OpenBSD: misc.c,v 1.18 2002/03/04 13:10:46 markus Exp $");
29 29
30#include "misc.h" 30#include "misc.h"
31#include "log.h" 31#include "log.h"
@@ -65,9 +65,8 @@ set_nonblock(int fd)
65 debug("fd %d setting O_NONBLOCK", fd); 65 debug("fd %d setting O_NONBLOCK", fd);
66 val |= O_NONBLOCK; 66 val |= O_NONBLOCK;
67 if (fcntl(fd, F_SETFL, val) == -1) 67 if (fcntl(fd, F_SETFL, val) == -1)
68 if (errno != ENODEV) 68 debug("fcntl(%d, F_SETFL, O_NONBLOCK): %s",
69 error("fcntl(%d, F_SETFL, O_NONBLOCK): %s", 69 fd, strerror(errno));
70 fd, strerror(errno));
71} 70}
72 71
73void 72void
@@ -87,9 +86,8 @@ unset_nonblock(int fd)
87 debug("fd %d clearing O_NONBLOCK", fd); 86 debug("fd %d clearing O_NONBLOCK", fd);
88 val &= ~O_NONBLOCK; 87 val &= ~O_NONBLOCK;
89 if (fcntl(fd, F_SETFL, val) == -1) 88 if (fcntl(fd, F_SETFL, val) == -1)
90 if (errno != ENODEV) 89 debug("fcntl(%d, F_SETFL, O_NONBLOCK): %s",
91 error("fcntl(%d, F_SETFL, O_NONBLOCK): %s", 90 fd, strerror(errno));
92 fd, strerror(errno));
93} 91}
94 92
95/* disable nagle on socket */ 93/* disable nagle on socket */