diff options
-rw-r--r-- | lib/libc_r/uthread/uthread_fd.c | 21 |
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 19b985f..695dfd0 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.5 1998/02/13 01:27:32 julian Exp $ + * $Id: uthread_fd.c,v 1.6 1998/04/29 09:58:46 jb Exp $ * */ #include <errno.h> @@ -115,17 +115,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: */ |