diff options
-rw-r--r-- | MDK/Common/System.pm | 11 | ||||
-rw-r--r-- | perl-MDK-Common.spec | 5 |
2 files changed, 14 insertions, 2 deletions
diff --git a/MDK/Common/System.pm b/MDK/Common/System.pm index b01a523..6fca4d6 100644 --- a/MDK/Common/System.pm +++ b/MDK/Common/System.pm @@ -121,6 +121,10 @@ If the category doesn't exist, it creates it. eg: update_gnomekderc("/etc/skels/.kderc", 'KDE', kfmIconStyle => "Large") +=item fuzzy_pidofs(REGEXP) + +return the list of process ids matching the regexp + =back =head1 OTHER @@ -158,7 +162,7 @@ use MDK::Common::File; use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK %compat_arch $printable_chars $sizeof_int $bitof_int); #); @ISA = qw(Exporter); -@EXPORT_OK = qw(%compat_arch $printable_chars $sizeof_int $bitof_int arch typeFromMagic list_passwd list_home list_skels syscall_ psizeof availableMemory availableRamMB gettimeofday unix2dos getVarsFromSh setVarsInSh setVarsInShMode setVarsInCsh template2file template2userfile update_gnomekderc); #); +@EXPORT_OK = qw(%compat_arch $printable_chars $sizeof_int $bitof_int arch typeFromMagic list_passwd list_home list_skels syscall_ psizeof availableMemory availableRamMB gettimeofday unix2dos getVarsFromSh setVarsInSh setVarsInShMode setVarsInCsh template2file template2userfile update_gnomekderc fuzzy_pidofs); #); %EXPORT_TAGS = (all => [ @EXPORT_OK ]); @@ -353,4 +357,9 @@ sub update_gnomekderc { } +sub fuzzy_pidofs { + my ($regexp) = @_; + grep { /^(\d+)$/ && MDK::Common::File::cat_("/proc/$_/cmdline") =~ /$regexp/ } MDK::Common::File::all('/proc'); +} + 1; diff --git a/perl-MDK-Common.spec b/perl-MDK-Common.spec index 38ddb92..ce0defb 100644 --- a/perl-MDK-Common.spec +++ b/perl-MDK-Common.spec @@ -2,7 +2,7 @@ # do not change the version here, change in MDK/Common.pm.pl %define version THEVERSION -%define release 5mdk +%define release 6mdk Summary: Various simple functions Name: perl-MDK-Common @@ -49,6 +49,9 @@ rm -rf $RPM_BUILD_ROOT # MODIFY IN THE CVS: cvs.mandrakesoft.com:/cooker soft/perl-MDK-Common %changelog +* Tue Jul 23 2002 Pixel <pixel@mandrakesoft.com> 1.0.3-6mdk +- MDK::Common::System: add fuzzy_pidofs + * Tue Jul 23 2002 Pixel <pixel@mandrakesoft.com> 1.0.3-5mdk - perl_checker: catch misuse of =~ when = was meant - MDK/Common/DataStructure.pm: add deref_array |