diff options
| author | John Birrell <jb@FreeBSD.org> | 1997-04-01 22:44:18 +0000 |
|---|---|---|
| committer | John Birrell <jb@FreeBSD.org> | 1997-04-01 22:44:18 +0000 |
| commit | e710f8d85bb8ba0acdcd0e5b4bfa2b1abac9ed46 (patch) | |
| tree | e7d6679886be8c7c2f41dc1756fad81f40147da9 /lib/libpthread/thread/thr_write.c | |
| parent | 796655339724a33d2c7bc9dcf05326998e28a19b (diff) | |
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_write.c')
| -rw-r--r-- | lib/libpthread/thread/thr_write.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libpthread/thread/thr_write.c b/lib/libpthread/thread/thr_write.c index 2baa19f08426..eab105d38352 100644 --- a/lib/libpthread/thread/thr_write.c +++ b/lib/libpthread/thread/thr_write.c @@ -29,6 +29,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * + * $Id$ + * */ #include <sys/types.h> #include <sys/fcntl.h> @@ -50,7 +52,7 @@ write(int fd, const void *buf, size_t nbytes) __FILE__, __LINE__)) == 0) { /* Perform a non-blocking write syscall: */ while ((ret = _thread_sys_write(fd, buf, nbytes)) < 0) { - if (_thread_fd_table[fd]->flags & O_NONBLOCK == 0 && + if ((_thread_fd_table[fd]->flags & O_NONBLOCK) == 0 && (errno == EWOULDBLOCK || errno == EAGAIN)) { _thread_kern_sig_block(&status); _thread_run->data.fd.fd = fd; |
