Skip to content

Commit

Permalink
Fix attach exit on darwin
Browse files Browse the repository at this point in the history
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume@charmes.net> (github: creack)
  • Loading branch information
creack committed Mar 12, 2014
1 parent 7b79f59 commit 95e5910
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions api/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
"path"
"reflect"
"regexp"
"runtime"
goruntime "runtime"
"strconv"
"strings"
"syscall"
Expand Down Expand Up @@ -367,7 +367,7 @@ func (cli *DockerCli) CmdVersion(args ...string) error {
if dockerversion.VERSION != "" {
fmt.Fprintf(cli.out, "Client version: %s\n", dockerversion.VERSION)
}
fmt.Fprintf(cli.out, "Go version (client): %s\n", runtime.Version())
fmt.Fprintf(cli.out, "Go version (client): %s\n", goruntime.Version())
if dockerversion.GITCOMMIT != "" {
fmt.Fprintf(cli.out, "Git commit (client): %s\n", dockerversion.GITCOMMIT)
}
Expand Down Expand Up @@ -2249,7 +2249,12 @@ func (cli *DockerCli) hijack(method, path string, setRawTerminal bool, in io.Rea
if setRawTerminal && cli.isTerminal {
term.RestoreTerminal(cli.terminalFd, oldState)
}
in.Close()
// For some reason this Close call blocks on darwin..
// As the client exists right after, simply discard the close
// until we find a better solution.
if goruntime.GOOS != "darwin" {
in.Close()
}
}
}()

Expand Down

0 comments on commit 95e5910

Please sign in to comment.