Make exec more consistent with the rest of the kubectl commands.

This commit is contained in:
Brendan Burns
2015-05-20 16:00:19 -07:00
parent b7caedeedb
commit 2ec4b409e1
7 changed files with 103 additions and 28 deletions

View File

@@ -980,7 +980,7 @@ func (r *runtime) ExecInContainer(containerID string, cmd []string, stdin io.Rea
}
if stdin != nil {
// Use an os.Pipe here as it returns true *os.File objects.
// This way, if you run 'kubectl exec -p <pod> -i bash' (no tty) and type 'exit',
// This way, if you run 'kubectl exec <pod> -i bash' (no tty) and type 'exit',
// the call below to command.Run() can unblock because its Stdin is the read half
// of the pipe.
r, w, err := os.Pipe()