anchor.diff:  
   function checkpidfile()
   {
  -   if [ -f "/var/run/${NAME}.pid" ]; then
  -      read kpid < /var/run/${NAME}.pid
  -      if [ -d "/proc/${kpid}" ]; then
  +   if [ -f "${CATALINA_PID}" ]; then
  +      read kpid < ${CATALINA_PID}
  +      if [ ! -z ${kpid} ] && [ -d "/proc/${kpid}" ]; then
   # The pid file exists and the process is running
             RETVAL="0"
         else
  
positive.code:                 fi
                  log_success_msg
              fi
              rm -f ${LOCK_DIR}/${NAME} /var/run/${NAME}.pid
          else
              log_failure_msg
              RETVAL="4"
  
negative.code:         fi
      fi
      # fix permissions on the log and pid files
      touch $CATALINA_PID 2>&1 || RETVAL="4"
      if [ "$RETVAL" -eq "0" -a "$?" -eq "0" ]; then
        chown ${TOMCAT_USER}:${TOMCAT_USER} $CATALINA_PID
  