summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmove/tree/mdk_totem18
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;