Re: what is a "writtable" fd in select?

From: Ton Hospel (thospel@mail.dma.be)
Date: Sat Mar 18 2000 - 09:28:55 EST


In article <Pine.LNX.4.21.0003171356290.5177-100000@ferret.lmh.ox.ac.uk>,
        Matthew Kirkwood <weejock@ferret.lmh.ox.ac.uk> writes:
> On Thu, 16 Mar 2000, Marty Leisner wrote:
>
>> It seems when you go into select on a pipe (in this case a named
>> pipe), freebsd and solaris come out of select when you can write some
>> data to the pipe (i.e. 512-1k). linux comes out of the select when
>> the pipe is empty.
>
> I suspect that it's so that you can guarantee an atomic
> write of PIPE_BUF bytes.
>
> Matthew.

Indeed. I think the problem is really that the size of the pipes is equal
to the guarenteed atomic write. It would be really nice if pipes were
bigger so that a program that trickles bytes into a pipe wouldn't always block
on select until the other side bothered to read. I would propose to make
pipe size twice PIPE_BUF.
(the current setup is not wrong, but it makes certain types of apps
unnecesarily slow)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Mar 23 2000 - 21:00:28 EST