Newbie Qu:- NT & Process Ids 
Author Message
 Newbie Qu:- NT & Process Ids

Hello!

Can someone tell me if there is a way to trap a parent process id. I've
figured out that $0 shows me the current id, but if there is a way to
check the id of a process which has called the current process, I could
stop banging my head against this wall.... 8)

By the way, I new to this Perl lark, so go easy on me with the replies!

Cheers

Andrew
------

My email address has been modified to avoid spam mail.
To reply, remove nospam. from my address.
------



Wed, 26 Apr 2000 03:00:00 GMT  
 Newbie Qu:- NT & Process Ids


Quote:

>Hello!

>Can someone tell me if there is a way to trap a parent process id. I've
>figured out that $0 shows me the current id, but if there is a way to
>check the id of a process which has called the current process, I could
>stop banging my head against this wall.... 8)

>By the way, I new to this Perl lark, so go easy on me with the replies!

Perl has getppid.  the perlfunc man page includes

       getppid Returns the process id of the parent process.

so you can say something like:

  $ppid = getppid;

If you're using a recent perl then you should have fairly comprehensive
docs on line...

Hope this helps,

Mike

--

http://www.stok.co.uk/~mike/       |   PGP fingerprint FE 56 4D 7D 42 1A 4A 9C
http://www.tiac.net/users/stok/    |                   65 F3 3F 1D 27 22 B7 41



Thu, 27 Apr 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. NT/Processes/IDs

2. getting process id from open on NT

3. to get the process ID of a running process

4. Forking processes (getting child process id)

5. Process id for fork()ed process

6. Getting Process ID of new process in system call

7. Getting Process ID of new process in system call

8. Newbie Qu. on Databases

9. Newbie needs Form Processing & Mail script

10. Newbie Q: perl & NT print command

11. Newbie - NT & DLL routine

12. Win32 process ID & status given process (program) name

 

 
Powered by phpBB® Forum Software