diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-02-21 10:00:36 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-02-21 10:00:36 +0000 |
commit | db1450155e9f8a82130ec45fd4ade9a17f23a4f5 (patch) | |
tree | 6afbeb43b8361d933b487d444a32cd16219e60c8 | |
parent | 7372ecc4aec96baad983c44b923654c2b052ef7a (diff) | |
download | drakx-db1450155e9f8a82130ec45fd4ade9a17f23a4f5.tar drakx-db1450155e9f8a82130ec45fd4ade9a17f23a4f5.tar.gz drakx-db1450155e9f8a82130ec45fd4ade9a17f23a4f5.tar.bz2 drakx-db1450155e9f8a82130ec45fd4ade9a17f23a4f5.tar.xz drakx-db1450155e9f8a82130ec45fd4ade9a17f23a4f5.zip |
smarter choosing of processes to kill
-rw-r--r-- | perl-install/pkgs.pm | 3 |
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; |