public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: jlnance@unity.ncsu.edu
To: linux-kernel@vger.kernel.org
Subject: socket vs pipe difference in /proc/pid/fd
Date: Wed, 18 Jun 2003 12:07:54 -0400	[thread overview]
Message-ID: <20030618160754.GA14475@ncsu.edu> (raw)

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

                 reply	other threads:[~2003-06-18 15:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030618160754.GA14475@ncsu.edu \
    --to=jlnance@unity.ncsu.edu \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox