summaryrefslogtreecommitdiffstats
path: root/move/tree/mdk_totem
diff options
context:
space:
mode:
Diffstat (limited to 'move/tree/mdk_totem')
-rwxr-xr-xmove/tree/mdk_totem5
1 files changed, 3 insertions, 2 deletions
diff --git a/move/tree/mdk_totem b/move/tree/mdk_totem
index c634118dd..c007acdad 100755
--- a/move/tree/mdk_totem
+++ b/move/tree/mdk_totem
@@ -16,7 +16,7 @@ sub busy_pids_and_files() {
my @l2 = grep { $_ } map { (split)[5] } cat_("/proc/$_/maps");
if (my @l = grep { m!^/(image(_boot)?|cdrom/live_tree)/! } @l1, @l2) {
- my ($cmdline) = cat_("/proc/$_/cmdline") =~ /([^\0]*)/;
+ my $cmdline = join(' ', split('\0', cat_("/proc/$_/cmdline")));
my $exe = readlink("/proc/$_/exe");
{ pid => $_, cmdline => $cmdline, exe => $exe, files => [ sort(uniq(@l)) ] };
} else {
@@ -69,9 +69,10 @@ if (@busy) {
my @progs = map {
my $s = $_->{cmdline};
+ $s =~ s!^/usr/bin/perl\s+([^-]\S*).*!$1!;
$s =~ s!/.*/!!;
$s =~ s!^kdeinit:\s+(\S+).*!$1!;
- $s =~ s!\s+--.*!!;
+ $s =~ s!\s.*!!;
$s;
} @busy;