pipe/fifo code merged.

Giovanni Trematerra gianni at freebsd.org
Tue Jan 31 21:49:03 UTC 2012


On Sun, Jan 29, 2012 at 12:37 AM, Jilles Tjoelker <jilles at stack.nl> wrote:
> 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.
>

Hi Jilles,
thanks a lot for looking at the patch.
I'll fix the issue in a new version of the patch.

--
Gianni


More information about the freebsd-arch mailing list