mirror of https://github.com/docker/cli.git
Do not disable sig-proxy when using a TTY
This partially revertse0b59ab52b
, and does not automatically disable proxying signals in TTY-mode Before this change: ------------------------------------ Start a container with a TTY in one shell: ``` docker run -it --init --name repro-28872 busybox sleep 30 ``` then, in another shell, kill the docker cli: ``` kill `pgrep -f repro-28872` ``` Notice that the CLI was killed, but the signal not forwarded to the container; the container continues running ``` docker container inspect --format '{{ .State.Status }}' repro-28872 running docker container rm -f repro-28872 ``` After this change: ------------------------------------ Start a container with a TTY in one shell: ``` docker run -it --init --name repro-28872 busybox sleep 30 ``` then, in another shell, kill the docker cli: ``` kill `pgrep -f repro-28872` ``` Verify that the signal was forwarded to the container, and the container exited ``` docker container inspect --format '{{ .State.Status }}' repro-28872 exited docker container rm -f repro-28872 ``` Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commitee29504923
) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
8a9e86c728
commit
137b3cc89e
|
@ -115,11 +115,6 @@ func runContainer(dockerCli command.Cli, opts *runOptions, copts *containerOptio
|
|||
config.StdinOnce = false
|
||||
}
|
||||
|
||||
// Disable sigProxy when in TTY mode
|
||||
if config.Tty {
|
||||
opts.sigProxy = false
|
||||
}
|
||||
|
||||
// Telling the Windows daemon the initial size of the tty during start makes
|
||||
// a far better user experience rather than relying on subsequent resizes
|
||||
// to cause things to catch up.
|
||||
|
|
Loading…
Reference in New Issue