On my machine which happens to be linux I do
$Parent_id = `cat /proc/$$/status |grep PPid |awk '{print \$2}'`
chomp $Parent_id
If you want the process name too you will get it from /proc/$Parent_id/stat
But be warned that this process will work only if the parent is still running else It will show init
Cedric Gross wrote:
Hello every body, How to know what task have run a perl script ? I mean is possible to get within the code which process Id have start the script.
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]