Skip to content

Improve defer clean-up on exit - #36

Merged
dirk merged 2 commits into
mainfrom
improve-cleanup
Aug 25, 2026
Merged

Improve defer clean-up on exit#36
dirk merged 2 commits into
mainfrom
improve-cleanup

Conversation

@dirk

@dirk dirk commented Aug 25, 2026

Copy link
Copy Markdown
Owner

Noticed a mistake: calling os.Exit upon a hook failing meant the defer'ed cleaning up of the shim in the temporary directory wouldn't happen. This switches to a return to the parent so that deferreds will be called. Included a regression test (checked it against main: the test failed there).

Also switched to plain old errgroup and WaitGroup for management of some parallel tasks.

dirk added 2 commits August 25, 2026 09:33
Also removes the `FanOut3` helper in favor of simple wait groups.
@dirk
dirk marked this pull request as ready for review August 25, 2026 17:04
@dirk
dirk merged commit b4909d0 into main Aug 25, 2026
5 checks passed
@dirk
dirk deleted the improve-cleanup branch August 25, 2026 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant