diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-11-18 15:00:33 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-11-18 15:00:33 +0000 |
commit | b1e5e0273ffce87405b767fe75fd6c1749a724db (patch) | |
tree | ae94ca82d19deda2462cc753df7c006fcbc6907a | |
parent | e6afe9330500026c088af4e0f3246346420ab9bd (diff) | |
download | drakx-backup-do-not-use-b1e5e0273ffce87405b767fe75fd6c1749a724db.tar drakx-backup-do-not-use-b1e5e0273ffce87405b767fe75fd6c1749a724db.tar.gz drakx-backup-do-not-use-b1e5e0273ffce87405b767fe75fd6c1749a724db.tar.bz2 drakx-backup-do-not-use-b1e5e0273ffce87405b767fe75fd6c1749a724db.tar.xz drakx-backup-do-not-use-b1e5e0273ffce87405b767fe75fd6c1749a724db.zip |
restart kicker if it annoys us
-rwxr-xr-x | move/tree/mdk_totem | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/move/tree/mdk_totem b/move/tree/mdk_totem index 72c0f9e6f..63b42285e 100755 --- a/move/tree/mdk_totem +++ b/move/tree/mdk_totem @@ -27,13 +27,21 @@ sub busy_pids_and_files() { sub remove_simple_daemons { my (@busy) = @_; - my @auto_killed = grep { $_->{cmdline} =~ m!\b(kdesud|kded|kio_uiserver)$! } @busy or return @busy; + foreach (@busy) { + $_->{to_restart} = 'kdeinit kicker' if $_->{cmdline} =~ m!\b(kicker)$!; + $_->{to_kill} = $_->{cmdline} =~ m!\b(kdesud|kded|kio_uiserver)$!; + } + my @auto_killed = grep { $_->{to_restart} || $_->{to_kill} } @busy; + + if (@auto_killed) { + kill 15, map { $_->{pid} } @auto_killed; + sleep 1; - kill 15, map { $_->{pid} } @auto_killed; - sleep 1; + $_ and system($_) foreach map { $_->{to_restart} } @auto_killed; - #- return updated list - busy_pids_and_files(); + @busy = busy_pids_and_files(); #- update list + } + @busy; } my $in = interactive->vnew; |