Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reap zombies #234

Merged
merged 5 commits into from
Aug 24, 2022
Merged

reap zombies #234

merged 5 commits into from
Aug 24, 2022

Conversation

vito
Copy link
Owner

@vito vito commented Aug 24, 2022

This modifies the shim executable (which runs as the init process for every thunk) to additionally reap child processes spawned by the thunk that would otherwise become zombies upon exiting.

Concretely this prevents accumulation of zombie dnsmasq processes when running Buildkit as a service for the tests. But it should help with any long-running service that needs to spawn processes that daemonize and then exit. Or an irresponsible parent that doesn't look after its children.

vito added 4 commits August 24, 2022 12:28
shim is the init, not the command. but we can just have the shim reap
zombies!
rather than forcing folks to configure a dumb-init entrypoint, we'll
just have the shim handle reaping zombies, since it's already there, and
it's pretty handy to not have to ever think about this

sidebar: we're getting into "how i learned to stop worrying and love the
shim" territory. it's a bit of a pain to have to maintain, but it sure
grants a lot of flexibility!
@vito vito added the enhancement New feature or request label Aug 24, 2022
@vito vito changed the title shim: reap child processes shim: reap zombies Aug 24, 2022
@vito vito changed the title shim: reap zombies reap zombies Aug 24, 2022
@vito vito merged commit b280ab3 into main Aug 24, 2022
@vito vito deleted the reaper branch August 24, 2022 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant