From: markt Date: Tue, 28 Sep 2010 21:30:27 +0000 (+0000) Subject: More review comments form mturk. Tighten up handling of ps output. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=656baca7f4b927873a8e3a26a54d0f900c289b1a;p=tomcat7.0 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 --- 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