Commit Graph

6 Commits

Author SHA1 Message Date
d66ad9dfab Resolve race conditions in attach API call
Signed-off-by: Jim Minter <jminter@redhat.com>
Upstream-commit: 84d6240cfe7cc66a7d3f6ac78ea6faad0e3108b9
Component: engine
2017-02-01 09:01:36 +00:00
8bdbf874a2 Refactor attaches copyEscapable
`copyEscapable` is a copy/paste of io.Copy with some added handling for
checking for the attach escape sequence.

This removes the copy/paste and uses `io.Copy` directly. To be able to
do this, it now implements an `io.Reader` which proxies to the main
reader but looks for the escape sequence.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 6380e3d939a5f992dc428febf02c25b0668d672c
Component: engine
2017-01-23 09:09:59 -05:00
8ae3be5ef9 Move attach code to stream package
This cleans up attach a little bit, and moves it out of the container
package.
Really `AttachStream` is a method on `*stream.Config`, so moved if from
a package level function to one bound to `Config`.
In addition, uses a config struct rather than passing around tons and
tons of arguments.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 2ddec97545f4c5834cfbc163c0168ce1d5826ba2
Component: engine
2017-01-23 09:09:57 -05:00
0c76241c26 Close stdout/stderr fifo as soon as possible
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 5a6184a535b62d9b5515d18d8561641d3f3d04cb
Component: engine
2017-01-11 22:11:13 -08:00
3723431bd0 Change Error log to Warning when close stdin fail
Signed-off-by: Lei Jitang <leijitang@huawei.com>
Upstream-commit: 37db0220452a837791af84d044b0b308260dccec
Component: engine
2016-11-29 20:42:29 -05:00
ad9327f119 Move StreamConfig out of runconfig
`StreamConfig` carries with it a dep on libcontainerd, which is used by
other projects, but libcontainerd doesn't compile on all platforms, so
move it to `github.com/docker/docker/container/stream`

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: 5ea75bb6bf41aeaeaa15d8bcceea5be87c211ffc
Component: engine
2016-11-14 15:15:09 -05:00