Parent Process id.

Discussion in 'Perl Misc' started by rajendra, Aug 6, 2007.

  1. rajendra

    rajendra Guest

    Hello All,

    If I open an application from a command prompt, then command prompt becomes
    the parent process of the application.

    Is there a perl command to get the parent process id for an application?.
     
    rajendra, Aug 6, 2007
    #1
    1. Advertising

  2. rajendra

    Paul Lalli Guest

    On Aug 6, 4:20 am, "rajendra" <> wrote:
    > If I open an application from a command prompt, then command
    > prompt becomes the parent process of the application.
    >
    > Is there a perl command to get the parent process id for an
    > application?.


    I assume by 'command' you mean function. It may help you to know that
    ALL built-in Perl functions are listed in the man page:
    perldoc perlfunc

    Within that documentation they are sorted by category type. If you
    scroll down, you will see this:

    Functions for processes and process groups
    "alarm", "exec", "fork", "getpgrp", "getppid",
    "getpriority", "kill", "pipe", "qx/STRING/", "setpgrp",
    "setpriority", "sleep", "system", "times", "wait",
    "waitpid"

    Once you find the function that looks likely, 'getppid', you can then
    do:
    perldoc -f getppid

    to read all about how to use it.

    Hope this helps,
    Paul Lalli
     
    Paul Lalli, Aug 6, 2007
    #2
    1. Advertising

  3. rajendra

    rajendra Guest

    Is getppid () is only for UNIX platform?...


    "Paul Lalli" <> wrote in message
    news:...
    > On Aug 6, 4:20 am, "rajendra" <> wrote:
    > > If I open an application from a command prompt, then command
    > > prompt becomes the parent process of the application.
    > >
    > > Is there a perl command to get the parent process id for an
    > > application?.

    >
    > I assume by 'command' you mean function. It may help you to know that
    > ALL built-in Perl functions are listed in the man page:
    > perldoc perlfunc
    >
    > Within that documentation they are sorted by category type. If you
    > scroll down, you will see this:
    >
    > Functions for processes and process groups
    > "alarm", "exec", "fork", "getpgrp", "getppid",
    > "getpriority", "kill", "pipe", "qx/STRING/", "setpgrp",
    > "setpriority", "sleep", "system", "times", "wait",
    > "waitpid"
    >
    > Once you find the function that looks likely, 'getppid', you can then
    > do:
    > perldoc -f getppid
    >
    > to read all about how to use it.
    >
    > Hope this helps,
    > Paul Lalli
    >
     
    rajendra, Aug 6, 2007
    #3
  4. rajendra

    Paul Lalli Guest

    On Aug 6, 10:44 am, "rajendra" <> wrote:
    > Is getppid () is only for UNIX platform?...


    perldoc perlport
    NAME
    perlport - Writing portable Perl
    ....
    Alphabetical Listing of Perl Functions
    ....
    getppid Not implemented. (Mac OS, Win32, RISC OS)

    Paul Lalli
     
    Paul Lalli, Aug 6, 2007
    #4
  5. On Aug 6, 7:56 am, Paul Lalli <> wrote:
    > On Aug 6, 10:44 am, "rajendra" <> wrote:
    >
    > > Is getppid () is only for UNIX platform?...

    >
    > perldoc perlport
    > NAME
    > perlport - Writing portable Perl
    > ...
    > Alphabetical Listing of Perl Functions
    > ...
    > getppid Not implemented. (Mac OS, Win32, RISC OS)
    >


    There's always (gulp), Win32::API.
     
    Skye Shaw!@#$, Aug 7, 2007
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Roy
    Replies:
    2
    Views:
    3,147
  2. mark
    Replies:
    1
    Views:
    579
  3. Replies:
    4
    Views:
    423
  4. Gauri
    Replies:
    3
    Views:
    188
  5. Gauri
    Replies:
    4
    Views:
    200
    -berlin.de
    Feb 28, 2007
Loading...

Share This Page