All of lore.kernel.org
 help / color / mirror / Atom feed
* process with socket
@ 2004-10-25 10:31 ych43
  2004-10-25 10:52 ` Jan Engelhardt
  0 siblings, 1 reply; 2+ messages in thread
From: ych43 @ 2004-10-25 10:31 UTC (permalink / raw)
  To: linux-kernel

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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: process with socket
  2004-10-25 10:31 process with socket ych43
@ 2004-10-25 10:52 ` Jan Engelhardt
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Engelhardt @ 2004-10-25 10:52 UTC (permalink / raw)
  To: ych43; +Cc: linux-kernel

>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.

This might give you a start:

$ find /proc -type s

or

$ ls -Rl /proc/[0-9]* | grep ^s



Jan Engelhardt
-- 
Gesellschaft für Wissenschaftliche Datenverarbeitung
Am Fassberg, 37077 Göttingen, www.gwdg.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-10-25 10:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-25 10:31 process with socket ych43
2004-10-25 10:52 ` Jan Engelhardt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.