dotcloud/docker — pull request #7083 by mheon (2014-07-17 13:15:19+00:00)
Title: Fix Panic with -t and -a stderr

Fixes #6983

At present, running docker with the -t and -a stderr flags (but no -a stdout) causes a panic. Adding a check to terminal hijack to ensure io.Copy is only used if STDOUT is attached fixes this.

Tested with all combinations of -a std(out|err|in) and -t, no regressions I can find.