]> git.proxmox.com Git - pve-access-control.git/commitdiff
sen TERM to all pgrp members
authorDietmar Maurer <dietmar@proxmox.com>
Tue, 18 Oct 2011 05:47:09 +0000 (07:47 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 18 Oct 2011 05:47:09 +0000 (07:47 +0200)
PVE/RPCEnvironment.pm

index 0905b65ef040930c6cc662ed96d4dc6936f99193..5806107d9e7eb4a0546b503809e371dd170db854 100644 (file)
@@ -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++;
            };