Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: workaround race in containerd runner with stdin pipe
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>
- Loading branch information