hyperhq / runv

Hypervisor-based Runtime for OCI
Apache License 2.0
828 stars 129 forks source link

Fix docker not creating stderr pipes since at least 1.13+ #427

Closed wrouesnel closed 7 years ago

wrouesnel commented 7 years ago

Docker at some point decided to stop creating stderr pipes when starting a process connected to a terminal. This patch adds some select logic to correctly support this new use case.

This problem manifests when using runv with docker versions >1.13 and possibly earlier.

This patch fixes the problem for all versions by ignoring the need to open stderr if a terminal is requested and the file does not exist. If it does exist, it is presumed the old behaviour is desired.

gnawux commented 7 years ago

LGTM