Buffer size used for FIFOS

Dave Korn dave.korn@artimi.com
Fri Dec 29 19:33:00 GMT 2006

On 29 December 2006 07:28, Justin T. Gibbs wrote:

> In playing with this in cygwin, I quickly discovered that the named pipes
> used to implement FIFOs are created with a size of 1 byte.  This is far less
> than cygwin's PIPE_BUF (4096) or the POSIX mandated minimum for PIPE_BUF
> (512). After reviewing the code, the setting seems deliberate
> (fhandler_pipe::create_selectable() has an explicit check to avoid bumping
> the size up to PIPE_BUF for FIFOs), but I couldn't find any code comments or
> changelog entries to explain the restriction.  Can anyone explain the
> requirement for this limit?

  Perhaps it is related to the misbehaviour of NtQueryInformationFile:


but this is highly speculative and I'm not quite sure whether restricting the
buffer size to 1 byte would help, but I'm wondering if iit would make coping
easier to reduce the scale of the problem from "Is there space in the buffer
and if so how much" to a binary "Is there any space in the buffer or none"?

Can't think of a witty .sigline today....

More information about the Cygwin-developers mailing list