mirror of
https://git.proxmox.com/git/pve-access-control
synced 2025-07-25 11:24:43 +00:00
sen TERM to all pgrp members
This commit is contained in:
parent
8d6e045f21
commit
527b2e7aed
@ -652,10 +652,12 @@ sub fork_worker {
|
||||
my $int_count = 0;
|
||||
eval {
|
||||
local $SIG{INT} = local $SIG{QUIT} = local $SIG{TERM} = sub {
|
||||
# always send signal to all pgrp members
|
||||
my $kpid = -$cpid;
|
||||
if ($int_count < 3) {
|
||||
kill(15, $cpid); # send TERM signal
|
||||
kill(15, $kpid); # send TERM signal
|
||||
} else {
|
||||
kill(9, $cpid); # send KILL signal
|
||||
kill(9, $kpid); # send KILL signal
|
||||
}
|
||||
$int_count++;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user