#212·dumb-init

Does dumb_init wait for all child processes to terminate?

Author: richard-browneCreated Oct 13, 2020Updated Apr 15, 2025

Question about SIGTERM behaviour. It's not clear from your README. Suppose I have a docker container thus:

ENTRYPOINT ["/usr/bin/dumb-init", "--", "entrypoint.sh"]

#!/bin/sh
crond -b
exec /usr/sbin/nginx -g daemon off

dumb_init will forward SIGTERM to both nginx and crond. All good. But does it wait for both nginx and crond to terminate before terminating itself? Or does it wait only for nginx to terminate? I hope the answer is that it waits for all child processes to terminate.