netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Arlott <simon@fire.lp0.eu>
To: netdev@vger.kernel.org
Subject: open() on sockets (sock_no_open)
Date: Sun, 15 Jul 2007 00:04:17 +0100	[thread overview]
Message-ID: <46995671.5080503@simon.arlott.org.uk> (raw)

There are sockets in /proc/<pid>/fd/, but they can't be opened because
of this function:

/*
 *  In theory you can't get an open on this inode, but /proc provides
 *  a back door. Remember to keep it shut otherwise you'll let the
 *  creepy crawlies in.
 */
static int sock_no_open(struct inode *irrelevant, struct file *dontcare)


How would I make it possible to open existing sockets?

It's possible to duplicate access to the same socket using fork(), but I
just seem to be creating a mess when I try to make open() work because
it breaks after calling socket_close... is there a way to do this so it
works properly?

-- 
Simon Arlott

                 reply	other threads:[~2007-07-14 23:04 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=46995671.5080503@simon.arlott.org.uk \
    --to=simon@fire.lp0.eu \
    --cc=netdev@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;
as well as URLs for NNTP newsgroup(s).