Skip to content

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.

2 participants