Difference between the Terminals and Standard IO in runc and youki
Overview
youki's handling of process.terminal and stdio differs from runc in several ways. This is an umbrella issue to track the gaps.
Issues
process.terminalfield is ignored (#3522): youki does not readprocess.terminalfrom the OCI spec. PTY setup is driven solely by whether--console-socketis passed. runc validates the combination ofterminal/detach/console-socketbefore starting the container.terminal=true+ foreground (no--console-socket): no I/O bridge: When running a container with a TTY in foreground without a console socket, runc bridges the PTY master to the host stdio. youki has no equivalent — there is a// TODO: Handling when there isn't console-socket.comment acknowledging this gap. As a result, container output is not visible and host input is not forwarded.terminal=false+ foreground: no explicit pipe setup: runc usessetupProcessPipesto connect the container's stdin/stdout/stderr to the host via explicit pipes. youki relies on implicit fd inheritance through fork, which accidentally works in simple cases but does not support I/O redirection via the API.
References
- runc
checkTerminal/tty.go: https://github.com/opencontainers/runc/blob/main/tty.go - runc
setupProcessPipes: https://github.com/opencontainers/runc/blob/main/libcontainer/process_linux.go - OCI Runtime Spec
process.terminal: https://github.com/opencontainers/runtime-spec/blob/main/config.md#process
Source: youki-dev/youki