From b1e5e0273ffce87405b767fe75fd6c1749a724db Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 18 Nov 2003 15:00:33 +0000 Subject: restart kicker if it annoys us --- move/tree/mdk_totem | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'move') 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; -- cgit v1.2.1