Named pipe question
paul at xciv.org
Wed Jan 23 15:38:29 GMT 2002
Alex Dyas <adyas at twowaytv.co.uk> wrote:
> Is it possible to get two "listeners" on one named pipe? In other words,
> I create a named pipe (mkfifo), listen to it with two separate tail -f
> instances, but only the first tail sees any data coming out.
Hrm.. I don't think so because.. your process is writing to the pipe,
and one of your other processes then read the data out, at which
point its gone hence the other process doesn't see the data.
> Is this a limitation of named pipes? It would be nice to be able to
> attach any number of "listeners" to the pipe as and when.
Would a duplicate file handle work here? It's so long since I've
done any programming or read Steve's APUE that I can't really
recall if that's applicable or would work.
More information about the Ukfreebsd