|
@@ -161,14 +161,14 @@ func (container *Container) startPty() error {
|
|
|
|
|
|
// Copy the PTYs to our broadcasters
|
|
|
go func() {
|
|
|
- defer container.stdout.Close()
|
|
|
+ defer container.stdout.CloseWriters()
|
|
|
Debugf("[startPty] Begin of stdout pipe")
|
|
|
io.Copy(container.stdout, stdoutMaster)
|
|
|
Debugf("[startPty] End of stdout pipe")
|
|
|
}()
|
|
|
|
|
|
go func() {
|
|
|
- defer container.stderr.Close()
|
|
|
+ defer container.stderr.CloseWriters()
|
|
|
Debugf("[startPty] Begin of stderr pipe")
|
|
|
io.Copy(container.stderr, stderrMaster)
|
|
|
Debugf("[startPty] End of stderr pipe")
|
|
@@ -374,10 +374,10 @@ func (container *Container) monitor() {
|
|
|
if err := container.releaseNetwork(); err != nil {
|
|
|
log.Printf("%v: Failed to release network: %v", container.Id, err)
|
|
|
}
|
|
|
- if err := container.stdout.Close(); err != nil {
|
|
|
+ if err := container.stdout.CloseWriters(); err != nil {
|
|
|
Debugf("%s: Error close stdout: %s", container.Id, err)
|
|
|
}
|
|
|
- if err := container.stderr.Close(); err != nil {
|
|
|
+ if err := container.stderr.CloseWriters(); err != nil {
|
|
|
Debugf("%s: Error close stderr: %s", container.Id, err)
|
|
|
}
|
|
|
if err := container.Unmount(); err != nil {
|