Commit 9bea3b3a authored by Mike Hibler's avatar Mike Hibler

Compensate for magent backgrounding itself: make sure the invoking shell

script sticks around so the program agent has something to kill!
parent fb2aa805
......@@ -21,11 +21,6 @@ $SH ${MAGENT_DIR}/ --daemonize $ARGS
# Note that we assume that a kill of us is "normal" and just exit 0.
trap "$AS_ROOT killall $MAGENT; exit 0" TERM
# Give it time to come up
sleep 1
# Wait for all of the agents to start
......@@ -47,8 +42,10 @@ fi
echo "Running!";
# Wait for our monitor to finish
# XXX ignores exit status of child
# We just sleep forever here as the stub has detached itself and
# we cannot exit without screwing up the program agent. The program
# agent will kill us (and the magent by virtue of the trap) when it
# is good and ready.
while true; do sleep 1000; done
exit 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment