Date: Sat, 10 Nov 2001 15:44:10 -0600 From: Alfred Perlstein <alfred@freebsd.org> To: Bruce Evans <bde@zeta.org.au> Cc: Bill Fenner <fenner@research.att.com>, cvs-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/fs/fifofs fifo_vnops.c Message-ID: <20011110154410.F89342@elvis.mu.org> In-Reply-To: <20011110213951.L17380-100000@delplex.bde.org>; from bde@zeta.org.au on Sat, Nov 10, 2001 at 09:47:36PM %2B1100 References: <200111100931.BAA04711@windsor.research.att.com> <20011110213951.L17380-100000@delplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
* Bruce Evans <bde@zeta.org.au> [011110 04:48] wrote: > On Sat, 10 Nov 2001, Bill Fenner wrote: > > > >For read(), it is normal to have to spin if there is no writer and you > > >don't want to block. > > > > You don't get a choice. POSIX [seems to say] that a blocking read on > > a FIFO with no writers will return 0, forcing you to spin no matter what. > > Oops. (I think it is clear that POSIX actually says this. So the only > way to avoid spinning is to do a blocking open().) > > > FIFO permissions mean that it's possible that the reader cannot > > supply a phantom writer. > > I forgot that you mentioned this before. Another note about the previous way being sort of broken... The previous implementation also had this weird problem where if your writer went away and data was buffered you wouldn't be able to get at it until another writer opened the FIFO. This manifested itself as the lockd not seeing the F_UNLCK because the kernel would write them and then immediately close its end of the FIFO. Or at least it seemed to be a problem, it probably could be solved by using a dummy writer but then you have the permissions problem that Mr Fenner keeps bringing up which I'm not sure I understand. -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' http://www.morons.org/rants/gpl-harmful.php3 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011110154410.F89342>