Skip to content

Commit

Permalink
fix race in forkmigrate
Browse files Browse the repository at this point in the history
See comments, this is another instance of:
golang/go#13155

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
  • Loading branch information
Tycho Andersen committed Jan 9, 2016
1 parent b9f4678 commit c98aa32
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lxd/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,11 @@ func MigrateContainer(args []string) error {
return err
}

/* see https://github.com/golang/go/issues/13155, startContainer, and dc3a229 */
os.Stdin.Close()
os.Stdout.Close()
os.Stderr.Close()

return c.Restore(lxc.RestoreOptions{
Directory: imagesDir,
Verbose: true,
Expand Down

0 comments on commit c98aa32

Please sign in to comment.