Find the answer to your Linux question:
Results 1 to 3 of 3
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 ...
  1. #1
    Just Joined!
    Join Date
    Jun 2010
    Posts
    1

    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
    Linux Enthusiast gerard4143's Avatar
    Join Date
    Dec 2007
    Location
    Canada, Prince Edward Island
    Posts
    714
    If your referring to kernel modules, then try including the linux/sched.h header and using.

    current->pid
    Make mine Arch Linux

  3. #3
    Linux Newbie
    Join Date
    Apr 2007
    Posts
    119
    I usually track my children pids in an array if there are a few of them. If you just want to make sure they have ended, you can just use wait().

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...