then check /proc/$pid/cmdline ...
cmdline doesn't exist in Solaris /proc. Proc-ProcessTable does the trick on several platforms:
use strict; use warnings; use Proc::ProcessTable; my $proc_table = Proc::ProcessTable->new->table; my ($process) = grep { $_->pid == $$ } @$proc_table; print $process->cmndline, "\n";
In reply to Re^2: Perl progname
by alexm
in thread Perl progname
by hammopau
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |