Date: Sat, 13 Dec 1997 05:50:01 -0800 (PST) From: Bruce Evans <bde@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 Message-ID: <199712131350.FAA06084@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199712131350.FAA06084>