From: Stephen L Johnson Date: Mon, 10 Jun 2002 20:31:20 +0000 (+0000) Subject: added ps checks in already_running() to make sure process is a spong-client X-Git-Tag: spong-2_8_0-beta1~77 X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fbe365dc4409b2e24e62491fb3a58ab17a08d7a8;p=spong.git added ps checks in already_running() to make sure process is a spong-client process before exiting --- diff --git a/src/spong-client.pl b/src/spong-client.pl index 0d8b7da..990a9c9 100755 --- a/src/spong-client.pl +++ b/src/spong-client.pl @@ -12,7 +12,7 @@ # History: # (1) Ported bb-local.sh script to perl. (Ed Hill Feb 26, 1997) # -# $Id: spong-client.pl,v 1.20 2002/01/17 17:02:12 sljohnson Exp $ +# $Id: spong-client.pl,v 1.21 2002/06/10 20:31:20 sljohnson Exp $ use lib '@@LIBDIR@@'; @@ -219,8 +219,11 @@ sub already_running { close PID; if ( kill 0,$pid ) { - &error("Spong-client is already running as pid $pid"); - exit 1; + `ps -fp $pid | grep spong-client >/dev/null`; + if ( ! $? ) { + &error("Spong-client is already running as pid $pid"); + exit 1; + } } } }