summaryrefslogtreecommitdiffstats
path: root/lib/MDK/Common
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MDK/Common')
-rw-r--r--lib/MDK/Common/System.pm10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/MDK/Common/System.pm b/lib/MDK/Common/System.pm
index a947523..b856e70 100644
--- a/lib/MDK/Common/System.pm
+++ b/lib/MDK/Common/System.pm
@@ -471,7 +471,15 @@ sub update_gnomekderc {
sub fuzzy_pidofs {
my ($regexp) = @_;
grep {
- /^(\d+)$/ && (MDK::Common::File::cat_("/proc/$_/cmdline") || readlink("/proc/$_/exe") || '') =~ /$regexp/;
+ if (/^(\d+)$/) {
+ my $s = MDK::Common::File::cat_("/proc/$_/cmdline") ||
+ readlink("/proc/$_/exe") ||
+ MDK::Common::File::cat_("/proc/$_/stat") =~ /\s(\S+)/ && $1 ||
+ '';
+ $s =~ /$regexp/;
+ } else {
+ 0;
+ }
} MDK::Common::File::all('/proc');
}