Note: Due to technical difficulties, the Archives are currently not up to date.
GMANE provides an alternative service for most mailing lists. c.f. bug 424647
List Archive: gentoo-dev
On Sat, 02 Jun 2012 18:04:41 -0700
Zac Medico <zmedico@g.o> wrote:
> #!/usr/bin/env bash
> named_pipe=$(mktemp -d)/fifo
>
> (
> # hold the pipe open in read mode, so
> # the writer doesn't block
> sleep 3
> ) < "$named_pipe" &
I don't understand this part. This keeps the pipe open for reading
which obviously causes it to lose data. If you open it, you need to
read all that is there and then close.
And writers are supposed to be blocked. They are forked and just write
when done, so there's no problem with keeping them alive for a short
while.
--
Best regards,
Michał Górny
|
|