Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Perl Misc (http://www.velocityreviews.com/forums/f67-perl-misc.html)
-   -   Parent Process id. (http://www.velocityreviews.com/forums/t904099-parent-process-id.html)

rajendra 08-06-2007 08:20 AM

Parent Process id.
 
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?.



Paul Lalli 08-06-2007 10:51 AM

Re: Parent Process id.
 
On Aug 6, 4:20 am, "rajendra" <rajendra.pra...@in.bosch.com> 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 08-06-2007 02:44 PM

Re: Parent Process id.
 
Is getppid () is only for UNIX platform?...


"Paul Lalli" <mritty@gmail.com> wrote in message
news:1186397502.286893.146490@19g2000hsx.googlegro ups.com...
> On Aug 6, 4:20 am, "rajendra" <rajendra.pra...@in.bosch.com> 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 08-06-2007 02:56 PM

Re: Parent Process id.
 
On Aug 6, 10:44 am, "rajendra" <rajendra.pra...@in.bosch.com> 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


Skye Shaw!@#$ 08-07-2007 07:44 AM

Re: Parent Process id.
 
On Aug 6, 7:56 am, Paul Lalli <mri...@gmail.com> wrote:
> On Aug 6, 10:44 am, "rajendra" <rajendra.pra...@in.bosch.com> 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.



All times are GMT. The time now is 10:53 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.