pipe/fifo code merged.

Jilles Tjoelker jilles at stack.nl
Sat Jan 28 23:37:15 UTC 2012


On Tue, Jan 17, 2012 at 12:43:19PM +0100, Giovanni Trematerra wrote:
> Did you agree that this patch
> http://www.trematerra.net/patches/pipefifo_merge2.4.diff

> doesn't introduce any further regressions while it fixes

> - style bugs you pointed out.
> - pipe_stat now use underlying filesystem information for pipes.
> - comment about pipeinfo was intended for.
> - race into pipe_poll (look at fifo_iseof line).

I tested this version of the patch and found that it breaks opening a
fifo with O_TRUNC: it fails with [EINVAL]. This appears to be
pipe_truncate()'s doing. Previously, truncate requests went to the
vnode.

In particular, this happens when opening a fifo for writing using
sh(1)'s > (unless 'set -C' is in effect) or >| redirection operators.
The open properly blocks until a reader arrives but then fails with
[EINVAL]. Several tests in tools/regression/bin/sh do this.

-- 
Jilles Tjoelker


More information about the freebsd-arch mailing list