Merge remote-tracking branch 'akatrevorjay/pull-req-0' into 1356_mh-safe-stop-kill-event
This commit is contained in:
commit
ff6de12196
1 file changed
+6
-2
@@ -181,8 +181,12 @@ case "$1" in
|
|||||||
trap '' INT HUP
|
trap '' INT HUP
|
||||||
sleep $WAIT
|
sleep $WAIT
|
||||||
for oldid in $oldids; do
|
for oldid in $oldids; do
|
||||||
docker stop $oldid &> /dev/null
|
# Attempt to stop, if that fails, then force a kill as docker seems
|
||||||
docker kill $oldid &> /dev/null # force a kill as docker seems to not send SIGKILL as the docs would indicate
|
# to not send SIGKILL as the docs would indicate. If that fails, move
|
||||||
|
# on to the next.
|
||||||
|
docker stop $oldid \
|
||||||
|
|| docker kill $oldid \
|
||||||
|
|| : # Always continue in case we have multiple to kill
|
||||||
done
|
done
|
||||||
) & disown -a
|
) & disown -a
|
||||||
# Use trap since disown/nohup don't seem to keep child alive
|
# Use trap since disown/nohup don't seem to keep child alive
|
||||||
|
|||||||
Reference in new issue
Block a user