Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Jun 1996 18:42:18 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        cimaxp1!jb@werple.net.au, haldjas.folklore.ee!narvi@melb.werple.net.au
Cc:        FreeBSD.org!hackers@melb.werple.net.au
Subject:   Re: Threads for -stable
Message-ID:  <199606280842.SAA20014@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>libc_r from -current should work with -stable. We use it with 2.1R. We
>*can't* use it with -current because of the pipe problems.

This reminds me that your pipe problem is supposed to be fixed (by
disabling an optimization) in -current, but isn't because the wrong NBIO
flag is checked.

The per-pipe NBIO flag is still wrong for another reason.  O_NONBLOCK is
supposed to be per-fd.  fcntl() converts O_NONBLOCK to FIONBIO for the
benefit of old drivers but it is possible for the per-fd flag to differ
from the per-device flag and the behaviour when the per-device flag is
modified while another process is blocked waiting for i/o is unpredictable.
This problem affects pipes, sockets, tty_snoop, bpf and tun.

Bruce

*** sys_pipe.c~	Mon Jun 17 23:27:59 1996
--- sys_pipe.c	Wed Jun 19 15:40:04 1996
***************
*** 737,741 ****
  		 * direct write mechanism.
  		 */
! 		if ((wpipe->pipe_state & PIPE_NBIO) == 0 &&
  			(amountpipekva < LIMITPIPEKVA) &&
  			(uio->uio_iov->iov_len >= PIPE_MINDIRECT)) {
--- 748,752 ----
  		 * direct write mechanism.
  		 */
! 		if (!nbio &&
  			(amountpipekva < LIMITPIPEKVA) &&
  			(uio->uio_iov->iov_len >= PIPE_MINDIRECT)) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199606280842.SAA20014>