Commit 1d6587ee authored by Kirk Webb's avatar Kirk Webb
Browse files

Small change to vnodesetup fixing the issue with processes disappearing on

killvserver() and getanyppid() which caused vnodesetup to fail when it
shouldn't have.
parent 76cc3800
......@@ -631,7 +631,7 @@ sub killvserver()
warn("Bad stat line: $statline\n");
}
}
else {
elsif (-e "/proc/$pid/status") {
# FreeBSD (Not used in reality, but useful for testing)
open(STAT, "/proc/$pid/status")
or die("Unable to get ppid of $pid");
......@@ -643,8 +643,14 @@ sub killvserver()
}
else {
warn("Bad stat line: $statline\n");
return 0;
}
}
else {
warn("Can't find status file for $pid.".
"Maybe it died or exited?");
return 0;
}
}
$SIG{TERM} = 'IGNORE';
......@@ -675,7 +681,6 @@ sub killvserver()
}
while (($pid, $ppid) = each %pids) {
$ppid = getanyppid($pid);
if ($pid <= 1 || $pid == $PID) { next; }
if ($debug) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment