Do not set O_NONBLOCK on a threaded program's descriptors any more. Instead,
authorMatthew Dillon <dillon@dragonflybsd.org>
Wed, 14 Jun 2006 01:45:28 +0000 (01:45 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Wed, 14 Jun 2006 01:45:28 +0000 (01:45 +0000)
commitcd3b2368db26275f35b83035e9de1cbf92acfce1
treee89242f0b859c0707492c4f5e90c2b3ebb690784
parentb279cbe166bacf69d0317fc0a978c4c4e9dd3e93
Do not set O_NONBLOCK on a threaded program's descriptors any more.  Instead,
use the new system calls to directly issue non-blocking I/O.  Additionally,
force blocking I/O for debug output.

This partly solves the problem of programs such as bmake or gmake fork/exec'd
children which happen to be threaded.  The children would set O_NONBLOCK
on e.g. stdin, stdout, and stderr, resulting in unexpected operation if the
unrelated parent program tries to issue a read or write.

Solves: gmake 'write error' problem
13 files changed:
lib/libc_r/uthread/pthread_private.h
lib/libc_r/uthread/uthread_accept.c
lib/libc_r/uthread/uthread_connect.c
lib/libc_r/uthread/uthread_exit.c
lib/libc_r/uthread/uthread_fd.c
lib/libc_r/uthread/uthread_info.c
lib/libc_r/uthread/uthread_kern.c
lib/libc_r/uthread/uthread_read.c
lib/libc_r/uthread/uthread_readv.c
lib/libc_r/uthread/uthread_sig.c
lib/libc_r/uthread/uthread_spinlock.c
lib/libc_r/uthread/uthread_write.c
lib/libc_r/uthread/uthread_writev.c