Skip to content

Commit

Permalink
Get rid of the exit handler in vm_shutdown_halt
Browse files Browse the repository at this point in the history
Otherwise calling exit will trigger a "cleanup_and_exit 1" call.
  • Loading branch information
mlschroe committed Mar 15, 2022
1 parent 23fd855 commit 604d944
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build-vm
Expand Up @@ -330,6 +330,8 @@ vm_shutdown_halt_helper() {
}

vm_shutdown_halt() {
# get rid of the exit handler
trap EXIT
test "$VM_TYPE" = lxc -o "$VM_TYPE" = docker -o "$VM_TYPE" = nspawn && exit $1
# shutdown from fresh shell to close out deleted inodes
exec -a "build: halt" -- $BASH -c "$(declare -f vm_shutdown_halt_helper); vm_shutdown_halt_helper $1"
Expand Down

0 comments on commit 604d944

Please sign in to comment.