Skip to contentSkip to conversation

open() on sockets (sock_no_open)

DISCUSSION Simon Arlott 1 participant 1 message Jul 14, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore 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?

Signature · 1 line
Simon Arlott