]> git.proxmox.com Git - pve-common.git/commitdiff
Allow to use check_process_running() without $pstart parameter.
authorDietmar Maurer <dietmar@proxmox.com>
Thu, 15 Sep 2011 04:56:07 +0000 (06:56 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 15 Sep 2011 04:56:07 +0000 (06:56 +0200)
data/PVE/ProcFSTools.pm

index d20aa9fa982b1ad340fbfb447dc8a98fd87261ad..723fd422e19347c1fb49f20821983f2527a1b27a 100644 (file)
@@ -153,7 +153,7 @@ sub check_process_running {
  
     my $info = read_proc_pid_stat($pid);
  
-    return $info && ($info->{starttime} eq $pstart) && ($info->{status} ne 'Z') ? $info : undef;
+    return $info && (!$pstart || ($info->{starttime} eq $pstart)) && ($info->{status} ne 'Z') ? $info : undef;
 }
 
 sub read_proc_starttime {