public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* socket vs pipe difference in /proc/pid/fd
@ 2003-06-18 16:07 jlnance
  0 siblings, 0 replies; only message in thread
From: jlnance @ 2003-06-18 16:07 UTC (permalink / raw)
  To: linux-kernel

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?

Thanks,

Jim

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-06-18 15:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-18 16:07 socket vs pipe difference in /proc/pid/fd jlnance

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox