diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-04-01 12:04:32 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-04-01 12:04:32 +0000 |
commit | 2ee6cb5c91eff0132149d8ad8c9055a42374ceb8 (patch) | |
tree | ee12a151da28429fec7379855bec2fa071b6b3ba /MDK | |
parent | c6f127db919336dae897357a1f2b6f3e9c6b3bbe (diff) | |
download | perl-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.pm | 4 |
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; |