From cb56fd32eb43f037c4126e1398b0e9cd546d9f19 Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Fri, 20 Jun 2014 16:48:51 -0400 Subject: [PATCH] LP#1337401: Only care about our own processes OpenSRF can run mutiple times, as different users, on one host. Right now we look for all service processes, but we should only look for our own. This patch does that. Signed-off-by: Mike Rylander Signed-off-by: Galen Charlton --- bin/opensrf-perl.pl.in | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/opensrf-perl.pl.in b/bin/opensrf-perl.pl.in index e98eed6..e1c7efc 100755 --- a/bin/opensrf-perl.pl.in +++ b/bin/opensrf-perl.pl.in @@ -211,8 +211,8 @@ sub get_service_pids_from_ps { my $service = shift; my $ps = ($service eq 'router') ? - "ps ax | grep 'OpenSRF Router'" : - "ps ax | grep 'OpenSRF Listener \\[$service\\]'"; + "ps x | grep 'OpenSRF Router'" : + "ps x | grep 'OpenSRF Listener \\[$service\\]'"; $ps .= " | grep -v grep | sed 's/^\\s*//' | cut -d' ' -f1"; my @pids = `$ps`; @@ -492,9 +492,9 @@ sub get_running_pids { # start with the listeners, then drones, then routers my @greps = ( - "ps ax | grep 'OpenSRF Listener' ", - "ps ax | grep 'OpenSRF Drone' ", - "ps ax | grep 'OpenSRF Router' " + "ps x | grep 'OpenSRF Listener' ", + "ps x | grep 'OpenSRF Drone' ", + "ps x | grep 'OpenSRF Router' " ); $_ .= "| grep -v grep | sed 's/^\\s*//' | cut -d' ' -f1" for @greps; -- 2.11.0