1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Commit graph

6 commits

Author SHA1 Message Date
Jim Minter
84d6240cfe Resolve race conditions in attach API call
Signed-off-by: Jim Minter <jminter@redhat.com>
2017-02-01 09:01:36 +00:00
Brian Goff
6380e3d939 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>
2017-01-23 09:09:59 -05:00
Brian Goff
2ddec97545 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>
2017-01-23 09:09:57 -05:00
Tonis Tiigi
5a6184a535 Close stdout/stderr fifo as soon as possible
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2017-01-11 22:11:13 -08:00
Lei Jitang
37db022045 Change Error log to Warning when close stdin fail
Signed-off-by: Lei Jitang <leijitang@huawei.com>
2016-11-29 20:42:29 -05:00
Brian Goff
5ea75bb6bf 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>
2016-11-14 15:15:09 -05:00