Skip to content

Instantly share code, notes, and snippets.

@boucher
Last active August 29, 2015 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boucher/4b084e05a3f8421f639e to your computer and use it in GitHub Desktop.
Save boucher/4b084e05a3f8421f639e to your computer and use it in GitHub Desktop.
cmd := exec.Command(c.criuPath, args...)
cmd.Stdin = process.Stdin
cmd.Stdout = process.Stdout
cmd.Stderr = process.Stderr
if err := cmd.Start(); err != nil {
return err
}
// cmd.Wait() waits cmd.goroutines which are used for proxying file descriptors.
// Here we want to wait only the CRIU process.
st, err := cmd.Process.Wait()
if err != nil {
return err
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment