Update go-runc to bd9aef7cf4402a3a8728e3ef83dcca6a5a1be899
Also remove the comment fields in the vndr script, they are too hard to keep up to date and add little value when we have the git commit timestamps Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
fc45d9c119
commit
4fd2478513
3 changed files with 45 additions and 86 deletions
17
vendor/github.com/crosbymichael/go-runc/utils.go
generated
vendored
17
vendor/github.com/crosbymichael/go-runc/utils.go
generated
vendored
|
@ -1,9 +1,7 @@
|
|||
package runc
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os/exec"
|
||||
"strconv"
|
||||
"syscall"
|
||||
)
|
||||
|
@ -18,21 +16,6 @@ func ReadPidFile(path string) (int, error) {
|
|||
return strconv.Atoi(string(data))
|
||||
}
|
||||
|
||||
// runOrError will run the provided command. If an error is
|
||||
// encountered and neither Stdout or Stderr was set the error and the
|
||||
// stderr of the command will be returned in the format of <error>:
|
||||
// <stderr>
|
||||
func runOrError(cmd *exec.Cmd) error {
|
||||
if cmd.Stdout != nil || cmd.Stderr != nil {
|
||||
return cmd.Run()
|
||||
}
|
||||
data, err := cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
return fmt.Errorf("%s: %s", err, data)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
const exitSignalOffset = 128
|
||||
|
||||
// exitStatus returns the correct exit status for a process based on if it
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue