diff options
| author | John Birrell <jb@FreeBSD.org> | 1997-04-01 22:49:58 +0000 |
|---|---|---|
| committer | John Birrell <jb@FreeBSD.org> | 1997-04-01 22:49:58 +0000 |
| commit | 745a12fc30cfd41506c8b3a7b16b27bf9cab94ed (patch) | |
| tree | d306a48a5e9e1daab8c5833c1433ec84a73c3db6 | |
| parent | e710f8d85bb8ba0acdcd0e5b4bfa2b1abac9ed46 (diff) | |
Notes
| -rw-r--r-- | lib/libc_r/uthread/uthread_fd.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/libc_r/uthread/uthread_fd.c b/lib/libc_r/uthread/uthread_fd.c index 4c74080e30aa..1e61bb760cae 100644 --- a/lib/libc_r/uthread/uthread_fd.c +++ b/lib/libc_r/uthread/uthread_fd.c @@ -29,6 +29,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * $Id$ + * */ #include <errno.h> #include <fcntl.h> @@ -102,8 +104,14 @@ _thread_fd_table_init(int fd) /* Make the file descriptor non-blocking: */ if (_thread_sys_fcntl(fd, F_SETFL, - _thread_fd_table[fd]->flags | O_NONBLOCK) == -1) - ret = errno; + _thread_fd_table[fd]->flags | O_NONBLOCK) == -1) { + /* + * Some devices don't support + * non-blocking calls (sigh): + */ + if (errno != ENODEV) + ret = errno; + } } /* Check if one of the fcntl calls failed: */ |
