mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
fix(scripts): allow graceful shutdown when --debug/dlv is used in develop.sh (#23023)
This commit is contained in:
committed by
GitHub
parent
836a2112b6
commit
cc6716c730
+5
-4
@@ -174,6 +174,10 @@ exit_cleanup() {
|
||||
# Wait for all children to exit (this can be aborted by hammer).
|
||||
wait_cmds
|
||||
|
||||
# Add a sleep to allow any final output to be flushed to keep the
|
||||
# terminal clean.
|
||||
sleep 0.5
|
||||
|
||||
exit 1
|
||||
}
|
||||
start_cmd() {
|
||||
@@ -214,10 +218,7 @@ wait_cmds() {
|
||||
}
|
||||
fatal() {
|
||||
echo "== FAIL: $*" >&2
|
||||
kill -INT $ppid >/dev/null 2>&1
|
||||
# Exit immediately so the calling context (ERR trap or
|
||||
# background job) doesn't continue executing commands
|
||||
# while cleanup is in progress.
|
||||
exit_cleanup
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user