Perl and Process ID
Matthew Carpenter
matt
Tue May 17 22:05:37 PDT 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Kurt Wall wrote:
> On Thursday 12 May 2005 11:45, Matthew Carpenter enlightened us
> thusly:
>
>> Hi All,
>>
>> How do I get the currently running perl app's process ID (short
>> of ps ax |grep )?
>
>
> $$
>
> as in:
>
> $ perl -e 'print "my pid is $$\n"'; my pid is 8079
>
Thanks Kurt, but this gives me the same as &getppid(), which is the
parent process. Am I missing something?
Thanks.
- --
Matthew Carpenter
matt at eisgr.com http://www.eisgr.com/
Enterprise Information Systems
* Network Server Appliances
* Security Consulting, Incident Handling & Forensics
* Network Consulting, Integration & Support
* Web Integration and E-Business
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCirdAso9lqh4MragRAoypAJ9TyNfME3a35bsFE1LMlqpi11u4UACg5jLj
mnwc3SEMcHwskcqBdwPutpg=
=XSrq
-----END PGP SIGNATURE-----
More information about the Linux-users
mailing list