Re: Really odd behavior of overlapping named pipes?

H. Peter Anvin (hpa@zytor.com)
26 Jan 2002 01:07:06 -0800


Followup to: <20020126021610.YKAU20810.femail29.sdc1.sfba.home.com@there>
By author: Rob Landley <landley@trommello.org>
In newsgroup: linux.dev.kernel
>
> You apparently can't share named pipe instances. They short-circuit. When I
> open four command shells, do a mkfifo /tmp/fifo, and then do the following:
>
> Shell one and two:
>
> cat /tmp/mkfifo
>
> Shell three and four:
>
> cat > /tmp/mkfifo
>
> Both of the write windows go into the FIRST read window. The second read
> window continues to block on the open, getting nothing.
>

A pipe is *one* communications channel.

A socket is *a communications channel creator*.

It sounds like what you're expecting is what would happen if we
allowed open() on a Unix domain socket to do the obvious thing (can
we, pretty please?)

-hpa

-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt	<amsp@zytor.com>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/