summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-02-21 10:00:36 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-02-21 10:00:36 +0000
commitdb1450155e9f8a82130ec45fd4ade9a17f23a4f5 (patch)
tree6afbeb43b8361d933b487d444a32cd16219e60c8 /perl-install
parent7372ecc4aec96baad983c44b923654c2b052ef7a (diff)
downloaddrakx-backup-do-not-use-db1450155e9f8a82130ec45fd4ade9a17f23a4f5.tar
drakx-backup-do-not-use-db1450155e9f8a82130ec45fd4ade9a17f23a4f5.tar.gz
drakx-backup-do-not-use-db1450155e9f8a82130ec45fd4ade9a17f23a4f5.tar.bz2
drakx-backup-do-not-use-db1450155e9f8a82130ec45fd4ade9a17f23a4f5.tar.xz
drakx-backup-do-not-use-db1450155e9f8a82130ec45fd4ade9a17f23a4f5.zip
smarter choosing of processes to kill
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/pkgs.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index 0d93e3601..820f888a1 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -1420,6 +1420,7 @@ sub install($$$;$$) {
} else {
#- child process will run each transaction.
$SIG{SEGV} = sub { log::l("segmentation fault on transactions"); c::_exit(0) };
+ my @prev_pids = grep { /^\d+$/ } all("/proc");
my $db;
eval {
close INPUT;
@@ -1477,7 +1478,7 @@ sub install($$$;$$) {
close OUTPUT;
#- now search for child process which may be locking the cdrom, making it unable to be ejected.
- if (my @killpid = grep { $_ > $$ } all("/proc")) {
+ if (my @killpid = difference2([ grep { /^\d+$/ } all("/proc") ], \@prev_pids)) {
log::l("ERROR: DrakX should not have to clean the packages shit. Killing ". join(", ", @killpid));
kill 15, @killpid;
sleep 2;