socket vs pipe difference in /proc/pid/fd

Date: Wed Jun 18 2003 - 11:07:54 EST

Hello All,
    I am running 2.4.20 and have run into something that may be a bug.

I am hacking some stuff together to debug a distributed application.
As part of this, I attempt to open /proc/pid/fd/0 and /proc/pid/fd/1
for a process. These descriptors are a socket, created with the
socketpair() system call in the processes parent. When I try to
open these sockets, from the shell, I get a message about the open
failing due to the /proc/pid/fd/0 being an invalid devicde.

If I change the parent application so that it uses 2 pipes rather than
a socketpair, then I have no problems opening the /proc files.

Is this difference between pipes and sockets deliberate?


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Mon Jun 23 2003 - 22:00:24 EST