'Ctrl+Z (SIGTSTP) has strange behavior in bash shell in docker container
I am using Docker for Desktop on Windows. I start a container with a bash shell in Powershell like this: docker run -it ubuntu /bin/bash Inside the bash shell I can send INT signals with Ctrl+C as expected, but Ctrl+Z/SIGTSTP has unexpected behavior. For a while it would always exit the bash process and return me to the Powershell even when I was in a child process like vim. Other times it will freeze bash and not take any more input. I've tried to use bash trap to see if the signal is caught but it doesn't seem to be the case. What is likely happening here? I can't tell if the problem is with bash, the container, or Powershell.
Solution 1:[1]
This issue is still unsolve.
I am using ConEmu and some setting instead of powershell to avoid this strange behavior. (For all aspect, ConEmu is more powerfull than the powershell or legacy mode.)
The settings is following:
hotkey : macro
ctrl+z : MsgBox("ctrl+z is disabled. To avoid strange behavior of docker on powershell.","trapped ctrl+z")
This intercepts ctrl+z and show message box.
ref.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | flowedhawk |
