Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Sep 2000 19:24:58 +0200
From:      Peter van Dijk <peter@dataloss.net>
To:        current@freebsd.org
Subject:   Re: FIFOs & select: what about our implementation?
Message-ID:  <20000905192458.A1428@dataloss.net>
In-Reply-To: <20000905195056.A67326@nagual.pp.ru>; from ache@nagual.pp.ru on Tue, Sep 05, 2000 at 07:50:56PM %2B0400
References:  <20000905195056.A67326@nagual.pp.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Sep 05, 2000 at 07:50:56PM +0400, Andrey A. Chernov wrote:
> Consider this comment comes from screen(1):
> 
> /*
>  * Define this if your system exits select() immediatly if a pipe is
>  * opened read-only and no writer has opened it.
>  */
> #define BROKEN_PIPE 1
> 
> We have broken(?) pipe, according to this statement. At least, we have
> select return code -1 with wrong errno == 0.

qmail calls this 'named pipe bug 1'. The workaround (which screen
probably uses too) is to let the process doing the select() also have
one fd opened for writing on the pipe. With that write-open, select()
will only return if there is actual data waiting inside the pipe.

I have filed a PR (19871) for this I think about 2 months ago, somebody
submitted a patch but I never gotten around to testing it.

I surely do think this behaviour is broken.

http://www.freebsd.org/cgi/query-pr.cgi?pr=19871

Greetz, Peter
-- 
dataloss networks


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000905192458.A1428>