Message-Id: <
200307032235.h63MZpKY036791@vran.herceg.de>
p4raw-id: //depot/perl@19971
my $mydollarzero = sub {
my($arg) = shift;
$0 = $arg if defined $arg;
- my $ps = `ps -o command= -p $$`;
+ # In FreeBSD the ps -o command= will cause
+ # an empty header line, grab only the last line.
+ my $ps = (`ps -o command= -p $$`)[-1];
return if $?;
chomp $ps;
printf "# 0[%s]ps[%s]\n", $0, $ps;