containers / libkrun

A dynamic library providing Virtualization-based process isolation capabilities
Apache License 2.0
809 stars 67 forks source link

Attach to interactive containers doesn't work without TTY #97

Open Agalin opened 1 year ago

Agalin commented 1 year ago

In short, this does work:

# podman run -d -i --runtime /usr/bin/crun alpine
63634bd214c84293bbd00b75d4d64da06bfe1f92fce1a777e2e4331da5611de9
# echo "echo 'test'" | podman attach 6 
test

while this does not:

# podman run -d -i --runtime /usr/bin/krun alpine
45b4014d2c6098c4a7295f23a14892668503fa3b6ebe5e569699e9c99aca5f1f
# echo "echo 'test'" | podman attach 45

For some reason trying to attach to a container without a TTY ends with a freeze (regardless of the --init being used or not). This breaks usage of containers in scripts.

slp commented 1 year ago

Thanks for the report! I've identified the problem. Will work a proper patch next Monday.