[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4BCAB50C.9030704@nerdgrounds.com>
Date: Sun, 18 Apr 2010 00:30:20 -0700
From: Jonathan Campbell <jon@...dgrounds.com>
To: ratheesh k <ratheesh.ksz@...il.com>
CC: linux-kernel@...r.kernel.org
Subject: Re: open sockets from task_struct
(reposted because I remember kernel.org mentioning that HTML email is
verboten or something like that---Sorry!)
I know that on the user-space side any open handles can be seen in the
/proc/<pid>/fd directory (<pid> is whatever process you're interested in).
Assuming you're talking about reading this from kernel space, I'd look
at what the procfs filesystem is doing and learn from that.
Sockets and block/char devices are listed like any other file, the list
is based on file handles.
> I have task_struct structure , how to find all the opened files ? how
> to find opened sockets ?
>
> Thanks,
> Ratheesh
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists