Thread: how To find process status using any standard unix system call?

  1. #1
    Registered User
    Join Date
    Jan 2009
    Posts
    2

    Question how To find process status using any standard unix system call?

    i want to know that one particuler process is running or not?
    is there any standard unix system call exist by which i can know about the present status of a process whose PID is known to us?

    plz help.

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Which flavour of Unix?

    As far as I know, there is no STANDARD way in Unix/Linux to get information about another process. Obviously process status (ps) will know how to do that, and there IS a way, but there's no definitely standardized way to do this.

    Linux and several other Unix flavours have pseudo-files under /proc/<pid>/... that give all sorts of information.

    The SIMPLE (and standard) way to deal with it, however, is to use the signal SIG_CHILD which gets sent to the owning process when the child process dies.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem building Quake source
    By Silvercord in forum Game Programming
    Replies: 16
    Last Post: 07-11-2010, 09:13 AM
  2. select system call with FIFO fd.
    By vlrk in forum Linux Programming
    Replies: 0
    Last Post: 05-11-2009, 04:27 AM
  3. How to get RSSI value, send to sensor, sensor receive package, repackage it?
    By techissue2008 in forum Networking/Device Communication
    Replies: 1
    Last Post: 03-04-2009, 10:13 AM
  4. Help calling function is asm
    By brietje698 in forum C++ Programming
    Replies: 24
    Last Post: 12-06-2007, 04:48 PM
  5. system call
    By fnoyan in forum Linux Programming
    Replies: 2
    Last Post: 06-07-2006, 10:53 AM