-
Notifications
You must be signed in to change notification settings - Fork 428
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
distrobox-enter should terminate child processes when the terminal is closed #966
Comments
See also: containers/podman#19944 |
I confirm this happens with podman and docker, it does not happen with This is because the spawned process by exec, is child of either This does not happen on Not sure what I can do, and if it's correct to be fixed on my side |
toolbox has been having the same issue, linking all related discussions here for cross-reference: |
After some back and forth, it does seem to be a distrobox bug. Basically, podman forwards SIGHUPs it receives. But the problem is See also: https://stackoverflow.com/a/60537655 |
I'm not sure if that's what you're referring to, but PID1 is Doing a quick experiment with the child So I'm not sure how I can forward this SIGHUP to the |
A bit of a weird one... I've been trying to figure out why host-spawn, and its children, do not terminate on my machine when I close a terminal window (1player/host-spawn#27). In theory, when you close a terminal window, a SIGHUP is sent to the controlling process, so anything that was running is terminated cleanly, which is what everyone expects.
This doesn't happen with distrobox-enter. This script calls
podman exec
, which ignores SIGHUP (probably because it is/was originally intended to run containers in the background), so any process running inside the container is never terminated and runs indefinitely in the background.Steps to reproduce
sleep infinity
)Expected behaviour (how it works normally)
sleep infinity
)This discrepancy is because SIGHUP, sent by the kernel when the pty closes, so that the foreground process can terminate, is being ignored by
podman exec
. I'm unsure what's the best approach here.The text was updated successfully, but these errors were encountered: