View Full Version : How to get child pids from parent pid in linux kernel mode?

06-28-2010, 02:29 PM
hi , i need C code to get child pids from its parent pid in linux and in kernel mode, is there anything like getpid() or getppid() which works in kernel mode? can you suggest ant trick how to do this. thanks

06-28-2010, 07:55 PM
Register to the parent via the child and pass the pid of the child to the parent.

06-28-2010, 10:17 PM
The 'ps' command seems to know a lot about the parent/child relationship of all processes.

Perhaps study the source code of that?