mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-10 21:53:57 +08:00
ps error logging improvement
Signed-off-by: rajasec <rajasec79@gmail.com> ps error logging improvement Signed-off-by: rajasec <rajasec79@gmail.com>
This commit is contained in:
@@ -51,9 +51,10 @@ var psCommand = cli.Command{
|
||||
psArgs = []string{"-ef"}
|
||||
}
|
||||
|
||||
output, err := exec.Command("ps", psArgs...).Output()
|
||||
cmd := exec.Command("ps", psArgs...)
|
||||
output, err := cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
return err
|
||||
return fmt.Errorf("%s: %s", err, output)
|
||||
}
|
||||
|
||||
lines := strings.Split(string(output), "\n")
|
||||
|
||||
Reference in New Issue
Block a user