process with socket

From: ych43
Date: Mon Oct 25 2004 - 05:38:46 EST


Hi,
I am working on UNIX Network Programming (sockets programming in C). My
problem is I do not know how to identify whether a process in Linux kernel has
a socket. Because so many different processes in Linux kernel are running, a
process forks many child processes and forms a process tree. I want to
identify a process that has socket and saves state data about it. Then saves
the same data about his parent process and walks up the process tree by
repeating this procedure until a process with PID 0 is reached. But I do not
know how to identify if a process has a socket.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/