Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit 99e61e2

Browse files
committed
Do not disable sig-proxy when using a TTY
This partially reverts moby/moby@e0b59ab, 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 commit ee295049231c84e59d00b7cf31eaefb86d936aad) Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: 137b3cc89ec16730c3f9923ec158ce13a51f286f Component: cli
1 parent 8a39b06 commit 99e61e2

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

  • components/cli/cli/command/container

components/cli/cli/command/container/run.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,6 @@ func runContainer(dockerCli command.Cli, opts *runOptions, copts *containerOptio
115115
config.StdinOnce = false
116116
}
117117

118-
// Disable sigProxy when in TTY mode
119-
if config.Tty {
120-
opts.sigProxy = false
121-
}
122-
123118
// Telling the Windows daemon the initial size of the tty during start makes
124119
// a far better user experience rather than relying on subsequent resizes
125120
// to cause things to catch up.

0 commit comments

Comments
 (0)