Date: Sun, 11 Sep 2005 22:06:22 GMT From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 83422 for review Message-ID: <200509112206.j8BM6Mae081424@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=83422 Change 83422 by rwatson@rwatson_peppercorn on 2005/09/11 22:05:22 When generating polling results for fifos, don't report read-only fifos as writable, or write-only fifos as readable. That would be dumb. Affected files ... .. //depot/projects/netsmp/src/sys/fs/fifofs/fifo_vnops.c#3 edit Differences ... ==== //depot/projects/netsmp/src/sys/fs/fifofs/fifo_vnops.c#3 (text+ko) ==== @@ -615,7 +615,7 @@ fip = fp->f_data; levents = events & (POLLIN | POLLINIGNEOF | POLLPRI | POLLRDNORM | POLLRDBAND); - if (levents) { + if ((fp->f_flag & FREAD) && levents) { /* * If POLLIN or POLLRDNORM is requested and POLLINIGNEOF is * not, then convert the first two to the last one. This @@ -641,7 +641,7 @@ } } levents = events & (POLLOUT | POLLWRNORM | POLLWRBAND); - if (levents) { + if ((fp->f_flag & FWRITE) && levents) { filetmp.f_data = fip->fi_writesock; filetmp.f_cred = cred; if (filetmp.f_data) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200509112206.j8BM6Mae081424>