]> git.proxmox.com Git - pve-common.git/blobdiff - src/PVE/Tools.pm
run_fork_with_timeout: do not overwrite global signal handlers
[pve-common.git] / src / PVE / Tools.pm
index 9818f636a03dadeaee6329370f2349c6173ff767..9ddcfda3444fde95fe76fad78b088986ec77177a 100644 (file)
@@ -910,11 +910,9 @@ sub run_fork_with_timeout {
     # disable pending alarms, save their remaining time
     my $prev_alarm = alarm 0;
 
-    # trap before forking to avoid leaving a zombie if the parent get killed
+    # avoid leaving a zombie if the parent gets interrupted
     my $sig_received;
-    local $SIG{INT} = $SIG{TERM} = $SIG{QUIT} = $SIG{HUP} = $SIG{PIPE} = sub {
-       $sig_received++;
-    };
+    local $SIG{INT} = sub { $sig_received++; };
 
     my $child = fork();
     if (!defined($child)) {