Attaching to a container and exiting/stopping on macOS #12906
-
Hello there, When I was searching about the differences between attach and exec, I understood that attaching is "recovering" the control over the process of PID 1 in a container. I'm using the default macOS Terminal app, and the default shell zsh. I've created a pod Everything up and running, nice. Now, I attach Now, I try a ctrl-p ctrl-q like noted in the man pages and nothing happens. I would guess that podman on macOS is receiving and parsing the keystrokes first instead of the attached container? Because... both ctrl-c and ctrl-\ should terminate the process right? So maybe that's because we have the virtual machine layer on macOS? Or maybe it's something about the Terminal app? I just tried bash and ctrl-p, ctrl-q didn't worked as well, so I guess zsh isn't the problem. I didn't wanted to open an issue on github because I don't know if I didn't understood attach/detach or if is something that only happens on macOS. I don't have other machine to test right now. I posted this on reddit and someone said I could start a discussion here instead of an issue. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This is because you didn't create the container with a terminal ( |
Beta Was this translation helpful? Give feedback.
This is because you didn't create the container with a terminal (
-t
). Without a terminal, OS X is parsing all keystrokes, then subsequently passing them over to the container; for containers with a terminal, we set raw mode on the terminal in OS X and pass over the literal bytes from the keyboard. C-p C-q to detach does not work without-t
because we can't interpret it ourselves, OS X is doing so.