mirror of
https://git.proxmox.com/git/pve-access-control
synced 2025-10-05 16:42:36 +00:00
flush output file handle and send kill to whole process group
This commit is contained in:
parent
a6e9428854
commit
f6f2d51fa9
@ -530,7 +530,7 @@ sub fork_worker {
|
|||||||
kill('KILL', $$);
|
kill('KILL', $$);
|
||||||
}
|
}
|
||||||
|
|
||||||
# sync with parent (signal that we are read)
|
# sync with parent (signal that we are ready)
|
||||||
if ($sync) {
|
if ($sync) {
|
||||||
print "$upid\n";
|
print "$upid\n";
|
||||||
} else {
|
} else {
|
||||||
@ -632,6 +632,7 @@ sub fork_worker {
|
|||||||
}
|
}
|
||||||
if ($outfh) {
|
if ($outfh) {
|
||||||
print $outfh $line;
|
print $outfh $line;
|
||||||
|
$outfh->flush();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -653,10 +654,10 @@ sub fork_worker {
|
|||||||
if ($outfh) {
|
if ($outfh) {
|
||||||
print $outfh "TASK ERROR: $err\n";
|
print $outfh "TASK ERROR: $err\n";
|
||||||
}
|
}
|
||||||
kill (15, $cpid);
|
kill (-15, $cpid);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
kill (9, $cpid); # make sure it gets killed
|
kill (-9, $cpid); # make sure it gets killed
|
||||||
}
|
}
|
||||||
|
|
||||||
close($outfh);
|
close($outfh);
|
||||||
|
Loading…
Reference in New Issue
Block a user