Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Parent Process id.

Reply
Thread Tools

Parent Process id.

 
 
rajendra
Guest
Posts: n/a
 
      08-06-2007
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?.


 
Reply With Quote
 
 
 
 
Paul Lalli
Guest
Posts: n/a
 
      08-06-2007
On Aug 6, 4:20 am, "rajendra" <(E-Mail Removed)> 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

 
Reply With Quote
 
 
 
 
rajendra
Guest
Posts: n/a
 
      08-06-2007
Is getppid () is only for UNIX platform?...


"Paul Lalli" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
> On Aug 6, 4:20 am, "rajendra" <(E-Mail Removed)> 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
>



 
Reply With Quote
 
Paul Lalli
Guest
Posts: n/a
 
      08-06-2007
On Aug 6, 10:44 am, "rajendra" <(E-Mail Removed)> 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

 
Reply With Quote
 
Skye Shaw!@#$
Guest
Posts: n/a
 
      08-07-2007
On Aug 6, 7:56 am, Paul Lalli <(E-Mail Removed)> wrote:
> On Aug 6, 10:44 am, "rajendra" <(E-Mail Removed)> 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
If a class Child inherits from Parent, how to implementChild.some_method if Parent.some_method() returns Parent instance ? metal Python 8 10-30-2009 10:31 AM
a simple program to illustrate that child process does not shareresources with parent process sree.harsha.sn@gmail.com C Programming 4 11-09-2008 03:59 AM
Parent process unable to read messages from child process Gauri Perl Misc 3 03-01-2007 02:06 AM
Parent process unable to read messages from child process Gauri Perl Misc 4 02-28-2007 11:18 PM
What does sender.Parent.Parent.Cells() reference? Frustrating... Roy ASP .Net 2 02-11-2005 09:00 PM



Advertisments