mirror of
https://github.com/docker/docs.git
synced 2026-03-27 22:38:54 +07:00
When stdout/stderr is closed prematurely, the proxy's writes to stdout/stderr (i.e. `log.Errorf/log.Printf`) will returns with EPIPE error, and go runtime will terminate the proxy when stdout/stderr writes trigger 10 EPIPE errors. instead of using stdout/stderr as the status handler, we pass an extra file to the child process and write `0\n` or `1\nerror message` to it and close it after. This allow the child process to handle stdout/stderr as normal. Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)