Thread: How to get child pids from parent pid in linux kernel mode?

  1. #1
    Registered User
    Join Date
    Jun 2010

    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

  2. #2
    {Jaxom,Imriel,Liam}'s Dad Kennedy's Avatar
    Join Date
    Aug 2006
    Register to the parent via the child and pass the pid of the child to the parent.

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    The 'ps' command seems to know a lot about the parent/child relationship of all processes.

    Perhaps study the source code of that?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Delete Binary Tree Node
    By matrixx333 in forum C Programming
    Replies: 4
    Last Post: 11-29-2009, 11:39 PM
  2. SIGNAL Suspended?
    By Victor_November in forum C Programming
    Replies: 11
    Last Post: 11-10-2009, 10:55 PM
  3. Replies: 3
    Last Post: 10-15-2008, 09:24 AM
  4. User mode and Kernel Mode
    By learner01 in forum Linux Programming
    Replies: 9
    Last Post: 08-10-2006, 08:20 PM
  5. User mode and Kernel mode
    By learner01 in forum C++ Programming
    Replies: 7
    Last Post: 08-09-2006, 02:38 PM

Tags for this Thread