LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   How to get child pids from parent pid in linux kernel mode? (http://www.linuxquestions.org/questions/programming-9/how-to-get-child-pids-from-parent-pid-in-linux-kernel-mode-816861/)

epezhman 06-28-2010 03:43 PM

How to get child pids from parent pid in linux kernel mode?
 
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

rweaver 06-28-2010 03:55 PM

There is some talk about how to get child pids when you discuss forking and creating children in the first place... google if this link doesn't have the info you want:

http://www.cs.cityu.edu.hk/~lwang/fork

resetreset 07-01-2010 02:26 AM

I don't know about the topic you posted, but it seems to me that inside the kernel, you don't HAVE processes - there is only the kernel itself running - processes etc. are in USER space. If you created a process in kernel mode, do you mean to say that it would be a child of the kernel itself - this sounds decidedly dodgy to me.
Can anybody correct me on this?


All times are GMT -5. The time now is 04:16 PM.