Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

Commit

Permalink
Revert "Ensure that the server and agent scripts propagate SIGTERM in…
Browse files Browse the repository at this point in the history
… foreground..."

(cherry picked from commit e7dda68)
  • Loading branch information
burmanm authored and Michael Burman committed Dec 19, 2014
1 parent 07169c1 commit 80b6d4f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
7 changes: 1 addition & 6 deletions modules/enterprise/agent/src/etc/rhq-agent.sh
Expand Up @@ -322,12 +322,7 @@ debug_msg "$CMD"

# Run the VM - put it in background if the caller wants it to be
if [ -z "$RHQ_AGENT_IN_BACKGROUND" ]; then
trap 'kill -TERM $RHQ_AGENT_PID' TERM INT
eval "$CMD &"
RHQ_AGENT_PID=$!
wait $RHQ_AGENT_PID
trap - TERM INT
wait $RHQ_AGENT_PID
eval "$CMD"
else
eval "$CMD &"
RHQ_AGENT_BACKGROUND_PID=$!
Expand Down
Expand Up @@ -459,12 +459,8 @@ case "$1" in
# START SERVER
# first, make sure its working directory is the JBossAS bin directory
cd "${RHQ_SERVER_JBOSS_HOME}/bin"
trap 'kill -TERM $PID' TERM INT
LAUNCH_JBOSS_IN_BACKGROUND=1 "$_JBOSS_RUN_SCRIPT" $_CMDLINE_OPTS &
PID=$!
wait $PID
trap - TERM INT
wait $PID
"$_JBOSS_RUN_SCRIPT" $_CMDLINE_OPTS

_JBOSS_STATUS=$?

remove_pid_files
Expand Down

0 comments on commit 80b6d4f

Please sign in to comment.