[Bug]: container run --interactive wrongly (de?)allocates stdin/stdout/terminal?
- Dominant language
- Swift
- Stars
- 49.9k
- Forks
- 1.8k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 22
Description
### I have done the following
- [x] I have searched the existing issues
- [ ] If possible, I've reproduced the issue using the 'main' branch of this project
### Steps to reproduce
Note that the value ends in `01234` but the actual output of `cat test` in the same line ends in `0123` no matter what and no matter how many times you call `cat test`. In the next line `cat test` is properly output and ends in `01234` as expected.
~ container run --interactive docker.io/debian:trixie-slim printf 01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234 >test; cat test; printf '\n'; cat test
~ cat test
The length of the value I provided is exactly one symbol longer than needed for misbehaviour to happen.
If you remove `--interactive`, misbehaviour vanishes.
The misbehaviour is not specific to `cat`. The issue can be reproduced with e. g. `base64
Contributor guide
Assessment
This issue has not been assessed yet.