Skip to content

Commit

Permalink
Read all data from pipe in StartInitialization
Browse files Browse the repository at this point in the history
Signed-off-by: Scott Francis <scott.francis@shopify.com>
  • Loading branch information
csfrancis committed Jan 23, 2016
1 parent 59f3066 commit 34abd45
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libcontainer/factory_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package libcontainer
import (
"encoding/json"
"fmt"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
Expand Down Expand Up @@ -251,6 +252,9 @@ func (l *LinuxFactory) StartInitialization() (err error) {
if err != nil {
return err
}
// Ensure that we've read everything from the pipe to ensure that the parent
// does not get an ECONNRESET after we close it.
ioutil.ReadAll(pipe)
return i.Init()
}

Expand Down

0 comments on commit 34abd45

Please sign in to comment.