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

Commit

Permalink
Merge pull request #152 from rhq-project/revert-149-sigterm-propagation
Browse files Browse the repository at this point in the history
Revert "Ensure that the server and agent scripts propagate SIGTERM in fo...
  • Loading branch information
burmanm committed Dec 12, 2014
2 parents 3e12199 + e7dda68 commit ec41d74
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 ec41d74

Please sign in to comment.