Work around issue #6247 on OSX docker client whereby call of tcpc.CloseWrite() prevents receipt of all output under some circumstances.

For example:

   docker run busybox sh -c 'echo err 1>&1; sleep 1; echo out'

produces 'err' on stderr and no output on stdout whereas it should produce 'out'.

The same example produces the expected output on Linux systems.

With this workaround:

   DOCKER_DO_NOT_CLOSE_WRITE=t docker run busybox sh -c 'echo err 1>&1; sleep 1; echo out'

will allow correct behaviour on OSX without affecting behaviour on other systems.

Docker-DCO-1.1-Signed-off-by: Jon Seymour <jon.seymour@gmail.com> (github: jonseymour)
Work around issue #6247 on OSX docker client whereby delayed output is truncated.

For example:

   docker run busybox sh -c 'echo out1; sleep 1; echo out2'

produces 'out1' whereas it should produce 'out1' and 'out2'.

The same example produces the expected output on Linux systems.

With this workaround:

   DOCKER_DO_NOT_CLOSE_WRITE=t   docker run busybox sh -c 'echo out1; sleep 1; echo out2'

will allow correct behaviour on OSX without affecting behaviour on other systems.

Docker-DCO-1.1-Signed-off-by: Jon Seymour <jon.seymour@gmail.com> (github: jonseymour)
Merge branch '6247-workaround-early-close-of-stdout-on-OSX'
fix: whitespace issue.

Docker-DCO-1.1-Signed-off-by: Jon Seymour <jon.seymour@gmail.com> (github: jonseymour)
Merge branch '6247-workaround-early-close-of-stdout-on-OSX'
Merge remote-tracking branch 'public/master'