-
Notifications
You must be signed in to change notification settings - Fork 346
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
Understanding session behavior #92
Comments
Hmm, that's not the behavior I see. with setsid mode
then, in another terminal
without setsid mode
in another terminal:
I'm running my tests outside of a Docker container, though. Are you running inside one? The container will exit when PID 1 (probably dumb-init) exits, and dumb-init exits as soon as bash exits. Since you're not in setsid mode, it won't send SIGTERM to the yes processes. But they'll be gone anyway since the entire container is about to exit. We usually find setsid mode more useful outside of containers (e.g. being able to signal a server and its worker processes, even if it doesn't forward signals to children normally). |
Oh derp, I'm running inside a container.
Could you help point me to documentation on what happens to child processes when a container exits? I was under the impression that it just sends SIGTERM + SIGKILL to PID 1, does it do anything else that causes it to differ from running it outside a container? |
Why can't you have a PID 1 (dumb-init) doing |
Edit: it is
|
您好,您的邮件我已经收到。
|
I'm trying to understand when running dumb-init under a session (i.e. not using
--single-child
) is useful, and I'm having a hard time reproducing the problem case. Here's a script I'm running that just runsyes
as both background and foreground:And then I'm running
dumb-init -c -- /script.sh
:When I run
kill 13014
, thesh
process quits, and allyes
processes quit as well. It's immediate, so this isn't the "TERM then wait 10s before KILL" behavior. This looks like good behavior, even though I'm using the-c
flag. Am I incorrectly reproducing this?The text was updated successfully, but these errors were encountered: