Re: Really odd behavior of overlapping named pipes?

From: H. Peter Anvin (hpa@zytor.com)
Date: Sat Jan 26 2002 - 04:07:06 EST


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/



This archive was generated by hypermail 2b29 : Thu Jan 31 2002 - 21:00:40 EST