Date: Fri, 9 Nov 2001 16:41:55 -0600 From: Alfred Perlstein <alfred@FreeBSD.org> To: Bruce Evans <bde@zeta.org.au> Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/fs/fifofs fifo_vnops.c Message-ID: <20011109164155.E89342@elvis.mu.org> In-Reply-To: <20011109201311.M9053-100000@delplex.bde.org>; from bde@zeta.org.au on Fri, Nov 09, 2001 at 08:52:36PM %2B1100 References: <200111081028.fA8ASW132591@freefall.freebsd.org> <20011109201311.M9053-100000@delplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
* Bruce Evans <bde@zeta.org.au> [011109 03:53] wrote:
> On Thu, 8 Nov 2001, Alfred Perlstein wrote:
>
> > alfred 2001/11/08 02:28:32 PST
> >
> > Modified files:
> > sys/fs/fifofs fifo_vnops.c
> > Log:
> > Switch behavior of fifos to more closely match what goes on in other OSes.
> > Basically FIFOs become a real pain to abuse as a rendevous point without
> > this change because you can't really select(2) on them because they always
> > return ready even though there is no writer (to signal EOF).
> >
> > Obtained from: BSD/os
>
> PR: 19871
>
> >
> > Revision Changes Path
> > 1.56 +6 -1 src/sys/fs/fifofs/fifo_vnops.c
>
> Arrgh. I thought you agreed with my mail saying that POSIX doesn't permit
> "fix"ing select():
>
> > On Thu, 25 Oct 2001 alfred@FreeBSD.ORG wrote:
> >
> > > Synopsis: select on named pipes always returns 'available for reading'
> > >
> > > Responsible-Changed-From-To: freebsd-bugs->alfred
> > > Responsible-Changed-By: alfred
> > > Responsible-Changed-When: Thu Oct 25 17:38:21 PDT 2001
> > > Responsible-Changed-Why:
> > > I'll take care of this.
> >
> > This can be closed now. See Bill Fenner's quote of POSIX.1-200x.
> >
> > Bruce
>
> This commit is much wronger than anything we discussed:
> 1) It doesn't actually "fix" select(), since SS_CANTRCVMORE is still set
> after the first (non-blocking) open when there are no writers. IIRC,
> this is the case that the PR requested fixing. It was certainly the
> only case that we seriously considered "fixing".
> 2) It breaks read() in all cases where there is no data and no writers,
> except in the case not "fixed" in (1).
>
> You didn't have to go to BSD/os (sic) to obtain this breakage. It could
> have been obtained by clobbering the part of rev.1.40 that fixed read()
> on fifos. Backing out all of rev.1.40 would also have given broken
> breakage for case (1).
>
> Please back this out.
I've never had a feeling that I own any code, so please feel free
to _replace_ (not back out) the current implementation as long as
your replacement implementation that doesn't offer semantics that
suck raw eggs like the pre-BSD/os derived fix implementation does.
Then either fix or tell me how to fix lockd to cope with the change
and I will.
--
-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?20011109164155.E89342>
