[jboss-cvs] JBossAS SVN: r101722 - trunk/main/src/bin.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Mar 2 11:40:24 EST 2010
Author: mladen.turk at jboss.com
Date: 2010-03-02 11:40:24 -0500 (Tue, 02 Mar 2010)
New Revision: 101722
Modified:
trunk/main/src/bin/run.sh
Log:
Solaris wait returns 0 for killed process. Also do use curly braces unless really needed
Modified: trunk/main/src/bin/run.sh
===================================================================
--- trunk/main/src/bin/run.sh 2010-03-02 16:11:58 UTC (rev 101721)
+++ trunk/main/src/bin/run.sh 2010-03-02 16:40:24 UTC (rev 101722)
@@ -250,14 +250,18 @@
while [ "$WAIT_STATUS" -ge 128 ]; do
wait $JBOSS_PID 2>/dev/null
WAIT_STATUS=$?
- if [ "${WAIT_STATUS}" -gt 128 ]; then
- SIGNAL=`expr ${WAIT_STATUS} - 128`
- SIGNAL_NAME=`kill -l ${SIGNAL}`
- echo "*** JBossAS process (${JBOSS_PID}) received ${SIGNAL_NAME} signal ***" >&2
+ if [ "$WAIT_STATUS" -gt 128 ]; then
+ SIGNAL=`expr $WAIT_STATUS - 128`
+ SIGNAL_NAME=`kill -l $SIGNAL`
+ echo "*** JBossAS process ($JBOSS_PID) received $SIGNAL_NAME signal ***" >&2
fi
done
- if [ "${WAIT_STATUS}" -lt 127 ]; then
+ if [ "$WAIT_STATUS" -lt 127 ]; then
JBOSS_STATUS=$WAIT_STATUS
+ if [ "$JBOSS_STATUS" = 0 ]; then
+ # Some wait implementations return 0 for non existing process
+ wait $JBOSS_PID 2>/dev/null
+ fi
else
JBOSS_STATUS=0
fi
More information about the jboss-cvs-commits
mailing list