summaryrefslogtreecommitdiffstats
path: root/MDK
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-04-01 12:04:32 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-04-01 12:04:32 +0000
commit2ee6cb5c91eff0132149d8ad8c9055a42374ceb8 (patch)
treeee12a151da28429fec7379855bec2fa071b6b3ba /MDK
parentc6f127db919336dae897357a1f2b6f3e9c6b3bbe (diff)
downloadperl-MDK-Common-2ee6cb5c91eff0132149d8ad8c9055a42374ceb8.tar
perl-MDK-Common-2ee6cb5c91eff0132149d8ad8c9055a42374ceb8.tar.gz
perl-MDK-Common-2ee6cb5c91eff0132149d8ad8c9055a42374ceb8.tar.bz2
perl-MDK-Common-2ee6cb5c91eff0132149d8ad8c9055a42374ceb8.tar.xz
perl-MDK-Common-2ee6cb5c91eff0132149d8ad8c9055a42374ceb8.zip
(fuzzy_pidofs): handle the empty /proc/XXX/cmdline case (using /proc/XXX/exe to have the name of the prog)
(it is now useful for xfs (XFree86))
Diffstat (limited to 'MDK')
-rw-r--r--MDK/Common/System.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/MDK/Common/System.pm b/MDK/Common/System.pm
index c22120a..d5f7997 100644
--- a/MDK/Common/System.pm
+++ b/MDK/Common/System.pm
@@ -379,7 +379,9 @@ sub update_gnomekderc {
sub fuzzy_pidofs {
my ($regexp) = @_;
- grep { /^(\d+)$/ && MDK::Common::File::cat_("/proc/$_/cmdline") =~ /$regexp/ } MDK::Common::File::all('/proc');
+ grep {
+ /^(\d+)$/ && (MDK::Common::File::cat_("/proc/$_/cmdline") || readlink("/proc/$_/exe") || '') =~ /$regexp/;
+ } MDK::Common::File::all('/proc');
}
1;