From owner-freebsd-hackers Fri Jun 28 01:50:18 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id BAA19365 for hackers-outgoing; Fri, 28 Jun 1996 01:50:18 -0700 (PDT) Received: from melb.werple.net.au (melb.werple.net.au [203.9.190.18]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id BAA19360 for ; Fri, 28 Jun 1996 01:50:15 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by melb.werple.net.au (8.7.5/8.7.3/2) with SMTP id SAA09841; Fri, 28 Jun 1996 18:47:22 +1000 (EST) Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.12/8.6.9) id SAA20014; Fri, 28 Jun 1996 18:42:18 +1000 Date: Fri, 28 Jun 1996 18:42:18 +1000 From: Bruce Evans Message-Id: <199606280842.SAA20014@godzilla.zeta.org.au> To: cimaxp1!jb@werple.net.au, haldjas.folklore.ee!narvi@melb.werple.net.au Subject: Re: Threads for -stable Cc: FreeBSD.org!hackers@melb.werple.net.au Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >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)) {