lilalo
diff l3-agent @ 110:2fc1f3f08760
fix
author | igor |
---|---|
date | Wed Feb 13 02:43:33 2008 +0200 (2008-02-13) |
parents | 4c02cf4123ee |
children | 658b4ea105c1 |
line diff
1.1 --- a/l3-agent Sun Jun 11 22:07:42 2006 +0300 1.2 +++ b/l3-agent Wed Feb 13 02:43:33 2008 +0200 1.3 @@ -866,7 +866,7 @@ 1.4 unlink $Config{agent_pidfile} 1.5 or die "Can't remove stale pidfile ". $Config{agent_pidfile}. " : $!"; 1.6 } 1.7 - elsif ($^O eq 'freebsd' && $pid && `ps axo uid,pid,command | grep '$<\\s*$pid\\s*$Config{"l3-agent"}' 2> /dev/null`) { 1.8 + elsif ($^O eq 'freebsd' && defined($pid) && $pid ne "" && not `ps axo uid,pid,command | grep '$< $pid $Config{"l3-agent"}' | grep -v grep 2> /dev/null`) { 1.9 print "Removing stale pidfile\n"; 1.10 unlink $Config{agent_pidfile} 1.11 or die "Can't remove stale pidfile ". $Config{agent_pidfile}. " : $!";