Created
May 18, 2015 16:57
-
-
Save boucher/f4848c0489ae2ae3cf78 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var stdout bytes.Buffer | |
stdinR, stdinW, err := os.Pipe() | |
pconfig := libcontainer.Process{ | |
Args: []string{"cat"}, | |
Env: standardEnvironment, | |
Stdin: stdinR, | |
Stdout: &stdout, | |
} | |
err = container.Start(&pconfig) | |
stdinR.Close() | |
defer stdinW.Close() | |
bytesWritten, err := stdinW.WriteString(fmt.Sprintln("Hello!")) | |
output := string(stdout.Bytes()) | |
log.Warnf("HERE: %v - %v", output, bytesWritten) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment