detect a new process created in Linux - Linux

This is a discussion on detect a new process created in Linux - Linux ; Hi How do u find a new process created in Linux ? does any specific files contains this info ? or is there any process counter for this . I need to get the pid of the newely created process ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: detect a new process created in Linux

  1. detect a new process created in Linux

    Hi

    How do u find a new process created in Linux ?

    does any specific files contains this info ? or is there any process
    counter for this .

    I need to get the pid of the newely created process

    manish


  2. Re: detect a new process created in Linux

    manu wrote:
    > Hi
    >
    > How do u find a new process created in Linux ?


    ``U'' examine the return value of the fork function.

    > I need to get the pid of the newely created process


    The fork function returns the pid to the parent process, and zero to
    the child. (It can also indicate failure with a -1).


+ Reply to Thread