summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/common.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/perl-install/common.pm b/perl-install/common.pm
index 2924c4cb7..2234c0e91 100644
--- a/perl-install/common.pm
+++ b/perl-install/common.pm
@@ -303,10 +303,10 @@ sub set_permissions {
sub is_running {
my ($name, $o_user) = @_;
my $user = $o_user || $ENV{USER};
- any {
+ foreach (`ps -o '%P %p %c' -u $user`) {
my ($ppid, $pid, $n) = /^\s*(\d+)\s+(\d+)\s+(.*)/;
- $ppid != 1 && $pid != $$ && $n eq $name;
- } `ps -o '%P %p %c' -u $user`;
+ return $pid if $ppid != 1 && $pid != $$ && $n eq $name;
+ }
}
sub parse_release_file {