Perl and Process ID

Matthew Carpenter matt
Thu May 12 10:36:32 PDT 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi All,

How do I get the currently running perl app's process ID (short of ps
ax |grep )?
I wrote a Perl app which ties up a mounted drive.  The drive is tagged
with a "lock" file which hopefully will contain the app's process ID
to avoid concurrent instances of this app running on the same drive.
I can mark the lock file, but as an added measure I want to PID in
there so another instance can validate the lock file.

I have found how to access the parent's PID, but not the process
itself.  Anyone?

Thanks,
Matt

- --
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

iD8DBQFCg3oWso9lqh4MragRApUVAJ4waku7xP4LIENcHN3qsY/zDqZMlwCgy3Yc
7CH1BD/73N5BCeMhnK8+Pxc=
=c7gq
-----END PGP SIGNATURE-----



More information about the Linux-users mailing list