[jboss-cvs] JBossAS SVN: r101726 - branches/Branch_5_0/main/src/bin.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Mar 2 12:07:31 EST 2010
Author: mladen.turk at jboss.com
Date: 2010-03-02 12:07:31 -0500 (Tue, 02 Mar 2010)
New Revision: 101726
Modified:
branches/Branch_5_0/main/src/bin/run.sh
Log:
Merge fix for JBPAPP-3796 from trunk
Modified: branches/Branch_5_0/main/src/bin/run.sh
===================================================================
--- branches/Branch_5_0/main/src/bin/run.sh 2010-03-02 17:06:02 UTC (rev 101725)
+++ branches/Branch_5_0/main/src/bin/run.sh 2010-03-02 17:07:31 UTC (rev 101726)
@@ -253,17 +253,17 @@
while true; do
if [ "x$LAUNCH_JBOSS_IN_BACKGROUND" = "x" ]; then
# Execute the JVM in the foreground
- "$JAVA" $JAVA_OPTS \
+ eval "$JAVA" $JAVA_OPTS \
-Djava.endorsed.dirs="$JBOSS_ENDORSED_DIRS" \
-classpath "$JBOSS_CLASSPATH" \
org.jboss.Main "$@"
JBOSS_STATUS=$?
else
# Execute the JVM in the background
- "$JAVA" $JAVA_OPTS \
+ eval "$JAVA" $JAVA_OPTS \
-Djava.endorsed.dirs="$JBOSS_ENDORSED_DIRS" \
-classpath "$JBOSS_CLASSPATH" \
- org.jboss.Main "$@" &
+ org.jboss.Main "$@" "&"
JBOSS_PID=$!
# Trap common signals and relay them to the jboss process
trap "kill -HUP $JBOSS_PID" HUP
@@ -276,17 +276,21 @@
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
else
JBOSS_STATUS=0
fi
+ if [ "$JBOSS_STATUS" -ne 10 ]; then
+ # Wait for a complete shudown
+ wait $JBOSS_PID 2>/dev/null
+ fi
fi
# If restart doesn't work, check you are running JBossAS 4.0.4+
# http://jira.jboss.com/jira/browse/JBAS-2483
More information about the jboss-cvs-commits
mailing list