diff options
| author | Dmitrij Tejblum <dt@FreeBSD.org> | 1998-09-13 15:33:42 +0000 |
|---|---|---|
| committer | Dmitrij Tejblum <dt@FreeBSD.org> | 1998-09-13 15:33:42 +0000 |
| commit | 8ab6008b79d37f88acccd8a52ef4775ea56697a6 (patch) | |
| tree | 7cdc56de9e728295c375e7f057e0dcaf62f373ef /lib | |
| parent | d3459488aec07a89a9721473ad14776139ea0e59 (diff) | |
Notes
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/libc_r/uthread/uthread_fd.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libc_r/uthread/uthread_fd.c b/lib/libc_r/uthread/uthread_fd.c index 814fc7bed44f..fa8b88b1b2e7 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.7 1998/05/27 00:41:22 jb Exp $ + * $Id: uthread_fd.c,v 1.8 1998/06/09 23:16:53 jb Exp $ * */ #include <errno.h> @@ -55,6 +55,7 @@ _thread_fd_table_init(int fd) { int ret = 0; struct fd_table_entry *entry; + int saved_errno; /* Check if the file descriptor is out of range: */ if (fd < 0 || fd >= _thread_dtablesize) { @@ -116,8 +117,10 @@ _thread_fd_table_init(int fd) * not support non-blocking calls, or if the * driver is naturally non-blocking. */ + saved_errno = errno; _thread_sys_fcntl(fd, F_SETFL, entry->flags | O_NONBLOCK); + errno = saved_errno; /* Lock the file descriptor table: */ _SPINLOCK(&fd_table_lock); |
