Fix interactive container hangs before exit when redirecting stdout #6509

Docker-DCO-1.1-Signed-off-by: roiz <clouddrd@gmail.com> (github: clouddrd)
Merge branch 'master' of http://github.com/clouddrd/docker

Docker-DCO-1.1-Signed-off-by: roiz <clouddrd@gmail.com> (github: clouddrd)