Question about pipe implementation

Ole Gjerde (
Tue, 29 Oct 1996 16:15:07 -0600 (CST)

Now I have looked through all the information I could find. And I can't
find what I was looking for. I also checked out fs/pipe.c, which would be
the logical place to find the code for it, but I couldn't find where the
pipe were created.

The "normal" way of implement pipes nowadays is using
sockets(internal)(At least I think so), and therefore all pipes created are
bi-directional(full-duplex). This also means you can hook up pipes
"backwards" and it will still work.
I know I have hooked up pipes backwards on linux(it worked), but
according to "Linux Programmers Guide" pipes in Linux are only

My question is therefore: Who is right? Is pipes in Linux not
implemented using sockets, and if it is, why aren't pipes bi-directional?

My initial reason for asking this is that one of my professors was saying
that he had this program in FreeBSD that worked great(pipes "backwards"),
and when he tried to port it to Linux it wouldn't work anymore.
Therefore, he concluded, Linux does not have bi-directional pipes.

Ole Gjerde
Studying Computer Science at North Dakota State University
"Unix _IS_ user friendly... It's just selective about who its friends are."
-- Unknown/Nem Schlecht