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
Printable View
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
Register to the parent via the child and pass the pid of the child to the parent.
The 'ps' command seems to know a lot about the parent/child relationship of all processes.
Perhaps study the source code of that?