summaryrefslogtreecommitdiffstats
path: root/move/tree/mdk_totem
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-11-18 15:00:33 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-11-18 15:00:33 +0000
commitb1e5e0273ffce87405b767fe75fd6c1749a724db (patch)
treeae94ca82d19deda2462cc753df7c006fcbc6907a /move/tree/mdk_totem
parente6afe9330500026c088af4e0f3246346420ab9bd (diff)
downloaddrakx-b1e5e0273ffce87405b767fe75fd6c1749a724db.tar
drakx-b1e5e0273ffce87405b767fe75fd6c1749a724db.tar.gz
drakx-b1e5e0273ffce87405b767fe75fd6c1749a724db.tar.bz2
drakx-b1e5e0273ffce87405b767fe75fd6c1749a724db.tar.xz
drakx-b1e5e0273ffce87405b767fe75fd6c1749a724db.zip
restart kicker if it annoys us
Diffstat (limited to 'move/tree/mdk_totem')
-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;