HBASE-12999 Make foreground_start return the correct exit code

This commit is contained in:
Elliott Clark 2015-02-09 18:26:10 -08:00
parent fa852c4ce6
commit a7d93155f1
1 changed files with 6 additions and 6 deletions

View File

@ -205,15 +205,15 @@ case $startStop in
# Add to the command log file vital stats on our environment.
echo "`date` Starting $command on `hostname`" >> ${HBASE_LOGLOG}
`ulimit -a` >> "$HBASE_LOGLOG" 2>&1
nice -n $HBASE_NICENESS "$HBASE_HOME"/bin/hbase \
--config "${HBASE_CONF_DIR}" \
$command "$@" start >> ${HBASE_LOGOUT} 2>&1 &
echo $! > ${HBASE_PID}
# in case the parent shell gets the kill make sure to trap signals.
# Only one will get called. Either the trap or the flow will go through.
trap cleanAfterRun SIGHUP SIGINT SIGTERM EXIT
wait
cleanAfterRun
nice -n $HBASE_NICENESS "$HBASE_HOME"/bin/hbase \
--config "${HBASE_CONF_DIR}" \
$command "$@" start >> ${HBASE_LOGOUT} 2>&1 &
hbase_pid=$!
echo $hbase_pid > ${HBASE_PID}
wait $hbase_pid
;;
(internal_autorestart)