Parent Process id.

R

rajendra

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?.
 
P

Paul Lalli

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
 
R

rajendra

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


Paul Lalli said:
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
 
P

Paul Lalli

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
 
S

Skye Shaw!@#$

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top