mirror of
https://github.com/siderolabs/talos.git
synced 2025-11-24 04:01:41 +01:00
Containerd API to pass stdin to the container is far from being perfect, but it seems to contain a race condition we can't avoid: if `NewTask()` fails, it starts the I/O loop in a goroutine, but never stops it. We can't stop it as well, as `NewTask()` failed, so to workaround this failure, copy the stdin into new reader on each access. This copying shouldn't be a big deal for us, as it's just machine configuration and it's tiny. Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>