diff options
| author | John Birrell <jb@FreeBSD.org> | 1998-04-29 09:59:34 +0000 |
|---|---|---|
| committer | John Birrell <jb@FreeBSD.org> | 1998-04-29 09:59:34 +0000 |
| commit | 4a027d50c7f3f30178a89b3159ba9e4b44f06885 (patch) | |
| tree | b7a4ea836e97e11d436f9a6657ea6a9ec8036c33 /lib/libpthread/thread/thr_write.c | |
| parent | ccf47cfcedf9f3db1780bc3b52ca0adb4480d3f6 (diff) | |
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_write.c')
| -rw-r--r-- | lib/libpthread/thread/thr_write.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/libpthread/thread/thr_write.c b/lib/libpthread/thread/thr_write.c index e86e71b87996..f8be7da47450 100644 --- a/lib/libpthread/thread/thr_write.c +++ b/lib/libpthread/thread/thr_write.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1995 John Birrell <jb@cimlogic.com.au>. + * Copyright (c) 1995-1998 John Birrell <jb@cimlogic.com.au> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: uthread_write.c,v 1.3 1997/04/01 22:44:17 jb Exp $ + * $Id: uthread_write.c,v 1.4 1998/02/13 01:27:33 julian Exp $ * */ #include <sys/types.h> @@ -45,7 +45,6 @@ ssize_t write(int fd, const void *buf, size_t nbytes) { int ret; - int status; /* Lock the file descriptor for write: */ if ((ret = _thread_fd_lock(fd, FD_WRITE, NULL, @@ -54,7 +53,6 @@ write(int fd, const void *buf, size_t nbytes) while ((ret = _thread_sys_write(fd, buf, nbytes)) < 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; _thread_kern_set_timeout(NULL); @@ -69,6 +67,7 @@ write(int fd, const void *buf, size_t nbytes) * interrupted by a signal */ if (_thread_run->interrupted) { + errno = EINTR; ret = -1; break; } |
