From 656baca7f4b927873a8e3a26a54d0f900c289b1a Mon Sep 17 00:00:00 2001 From: markt Date: Tue, 28 Sep 2010 21:30:27 +0000 Subject: [PATCH] More review comments form mturk. Tighten up handling of ps output. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1002362 13f79535-47bb-0310-9956-ffa450edef68 --- bin/catalina.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/catalina.sh b/bin/catalina.sh index ca8b292b7..84daac1e3 100755 --- a/bin/catalina.sh +++ b/bin/catalina.sh @@ -323,7 +323,8 @@ elif [ "$1" = "start" ] ; then if [ -s "$CATALINA_PID" ]; then if [ -r "$CATALINA_PID" ]; then PID="`cat "$CATALINA_PID"`" - if ps -p $PID > /dev/null; then + ps -p $PID > /dev/null 2>&1 + if [ $? -eq 0 ] ; then echo "Tomcat appears to still be running with PID $PID. Start aborted." exit 1 else -- 2.11.0