1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/libcontainerd/process_windows.go
John Howard 52237787fa Windows: Minimal docker top implementation
Signed-off-by: John Howard <jhoward@microsoft.com>
2016-03-20 16:45:53 -07:00

27 lines
498 B
Go

package libcontainerd
import (
"io"
)
// process keeps the state for both main container process and exec process.
type process struct {
processCommon
// Platform specific fields are below here.
// commandLine is to support returning summary information for docker top
commandLine string
}
func openReaderFromPipe(p io.ReadCloser) io.Reader {
r, w := io.Pipe()
go func() {
if _, err := io.Copy(w, p); err != nil {
r.CloseWithError(err)
}
w.Close()
p.Close()
}()
return r
}