summaryrefslogtreecommitdiffstats
path: root/perl-install/pkgs.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-04-06 12:51:40 +0000
committerFrancois Pons <fpons@mandriva.com>2001-04-06 12:51:40 +0000
commit8153757bea44845db44518fbfdded8d60bdcfd5c (patch)
treecfa841541771cff23734f2afd93987f4ae8840d0 /perl-install/pkgs.pm
parent6b883078c9ef491781bc74c8d0ded9c01c23f4de (diff)
downloaddrakx-8153757bea44845db44518fbfdded8d60bdcfd5c.tar
drakx-8153757bea44845db44518fbfdded8d60bdcfd5c.tar.gz
drakx-8153757bea44845db44518fbfdded8d60bdcfd5c.tar.bz2
drakx-8153757bea44845db44518fbfdded8d60bdcfd5c.tar.xz
drakx-8153757bea44845db44518fbfdded8d60bdcfd5c.zip
added killing on child process of transaction that have been detached (typically
with pid > transaction_pid and parent is 1).
Diffstat (limited to 'perl-install/pkgs.pm')
-rw-r--r--perl-install/pkgs.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index db0c85780..cb2f70e47 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -1383,7 +1383,10 @@ sub install($$$;$$) {
}
closedir DIR;
foreach (keys %tree) {
+ #- remove child of this process (which will terminate).
$pid = $_; while ($pid = $tree{$pid}) { $pid == $$ and push @killpid, $_ }
+ #- remove child of 1 direct that have a pid greater than current one.
+ $_ > $$ && $tree{$_} == 1 and push @killpid, $_;
}
if (@killpid) {
log::l("killing process ". join(", ", @killpid));