From owner-cvs-sys Sat Dec 13 05:52:37 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id FAA24238 for cvs-sys-outgoing; Sat, 13 Dec 1997 05:52:37 -0800 (PST) (envelope-from owner-cvs-sys) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id FAA24194; Sat, 13 Dec 1997 05:52:14 -0800 (PST) (envelope-from bde@FreeBSD.org) From: Bruce Evans Received: (from bde@localhost) by freefall.freebsd.org (8.8.6/8.8.5) id FAA06084; Sat, 13 Dec 1997 05:50:01 -0800 (PST) Date: Sat, 13 Dec 1997 05:50:01 -0800 (PST) Message-Id: <199712131350.FAA06084@freefall.freebsd.org> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-sys@FreeBSD.ORG Subject: cvs commit: src/sys/miscfs/fifofs fifo_vnops.c Sender: owner-cvs-sys@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk bde 1997/12/13 05:50:01 PST Modified files: sys/miscfs/fifofs fifo_vnops.c Log: Fixed EOF handing. 1. SS_CANTRCVMORE was initially set on the wrong socket, so reads when there has never been a writer on the socket did not return 0. Note that such reads are only possible if the fifo was opened in (O_RDONLY | O_NONBLOCK) mode. 2. SS_CANTSENDMORE was initially set on the wrong socket, but this was harmless because the wrong socket is never sent from and there is no need to set the flag initially on the right socket (since open in (O_WRONLY | O_NONBLOCK) mode fails if there is no reader...). 3. SS_CANTRCVMORE was cleared when read() returns. This broke the case where read() returns 0 - subsequent reads are supposed to return 0 until a writer appears. There is no need to clear the flag when read() returns, since it is cleared correctly when a writer appears. Revision Changes Path 1.40 +2 -8 src/sys/miscfs/fifofs/fifo_vnops.c