[jboss-cvs] JBossAS SVN: r75849 - branches/Branch_4_2/system/src/bin.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Jul 15 14:43:17 EDT 2008
Author: dimitris at jboss.org
Date: 2008-07-15 14:43:17 -0400 (Tue, 15 Jul 2008)
New Revision: 75849
Modified:
branches/Branch_4_2/system/src/bin/run.sh
Log:
JBAS-4287, fix background execution with LAUNCH_JBOSS_IN_BACKGROUND on Solaris
Modified: branches/Branch_4_2/system/src/bin/run.sh
===================================================================
--- branches/Branch_4_2/system/src/bin/run.sh 2008-07-15 18:14:23 UTC (rev 75848)
+++ branches/Branch_4_2/system/src/bin/run.sh 2008-07-15 18:43:17 UTC (rev 75849)
@@ -227,18 +227,27 @@
trap "kill -PIPE $JBOSS_PID" PIPE
trap "kill -TERM $JBOSS_PID" TERM
# Wait until the background process exits
- WAIT_STATUS=0
- while [ "$WAIT_STATUS" -ne 127 ]; do
- JBOSS_STATUS=$WAIT_STATUS
+ WAIT_STATUS=128
+ 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
+ fi
done
+ if [ "${WAIT_STATUS}" -lt 127 ]; then
+ JBOSS_STATUS=$WAIT_STATUS
+ else
+ JBOSS_STATUS=0
+ fi
fi
# If restart doesn't work, check you are running JBossAS 4.0.4+
# http://jira.jboss.com/jira/browse/JBAS-2483
# or the following if you're running Red Hat 7.0
# http://developer.java.sun.com/developer/bugParade/bugs/4465334.html
- if [ $JBOSS_STATUS -eq 10 ]; then
+ if [ "$JBOSS_STATUS" -eq 10 ]; then
echo "Restarting JBoss..."
else
exit $JBOSS_STATUS
More information about the jboss-cvs-commits
mailing list