Share your knowledge at the LQ Wiki.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 06-28-2010, 03:43 PM   #1
LQ Newbie
Registered: Jun 2010
Posts: 1

Rep: Reputation: 0
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
Old 06-28-2010, 03:55 PM   #2
Senior Member
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 164Reputation: 164
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:
Old 07-01-2010, 02:26 AM   #3
Senior Member
Registered: Mar 2008
Location: Cyberspace
Distribution: Dynebolic, Ubuntu 10.10
Posts: 1,340

Rep: Reputation: 62
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?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Identify what child threads/PIDs are doing jmdjr Linux - Enterprise 2 03-27-2009 07:13 AM
File descriptors shared between child and parent causing parent to hang. bharadiaam Linux - Newbie 1 03-02-2009 01:01 AM
Are threads allocated different PIDs then its parent's PID? piyush.kansal Programming 11 07-09-2007 08:02 PM
get the PID of a separate process (no parent-child relationship) arunj Linux - Software 6 02-03-2006 01:50 AM
Parent PIDs Sinope Linux - Newbie 6 10-05-2004 11:46 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:07 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration