summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJohn Birrell <jb@FreeBSD.org>1998-05-26 22:11:30 +0000
committerJohn Birrell <jb@FreeBSD.org>1998-05-26 22:11:30 +0000
commite291a8bf9a51a4fd9873030cd31e4577833a2e8f (patch)
tree4394cfc11e8483c2b5b65dc5c5d45764949f85d9 /lib
parenteb9ca9b92c894548c2e9ed972ed67c287a9edbcb (diff)
Notes
Diffstat (limited to 'lib')
-rw-r--r--lib/libc_r/uthread/uthread_fd.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/lib/libc_r/uthread/uthread_fd.c b/lib/libc_r/uthread/uthread_fd.c
index 24f5910f5af6..7decb36f8d95 100644
--- a/lib/libc_r/uthread/uthread_fd.c
+++ b/lib/libc_r/uthread/uthread_fd.c
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: uthread_fd.c,v 1.2.2.1 1997/06/24 00:27:56 julian Exp $
+ * $Id: uthread_fd.c,v 1.2.2.2 1998/02/13 01:35:55 julian Exp $
*
*/
#include <errno.h>
@@ -113,17 +113,14 @@ _thread_fd_table_init(int fd)
_thread_fd_table[fd]->flags =
_pthread_stdio_flags[fd];
- /* Make the file descriptor non-blocking: */
- if (_thread_sys_fcntl(fd, F_SETFL,
- _thread_fd_table[fd]->flags | O_NONBLOCK) == -1) {
- /*
- * Some devices don't support
- * non-blocking calls (sigh):
- */
- if (errno != ENODEV) {
- ret = -1;
- }
- }
+ /*
+ * Make the file descriptor non-blocking.
+ * This might fail if the device driver does
+ * not support non-blocking calls, or if the
+ * driver is naturally non-blocking.
+ */
+ _thread_sys_fcntl(fd, F_SETFL,
+ _thread_fd_table[fd]->flags | O_NONBLOCK);
}
/* Check if one of the fcntl calls failed: */