Remove the workaround which add a -- flag to runc ps command and add integration for ps -eaf

Signed-off-by: Shukui Yang <yangshukui@huawei.com>
This commit is contained in:
Shukui Yang
2016-09-24 12:20:52 +08:00
parent 650c97a111
commit 993126259c
2 changed files with 29 additions and 6 deletions
+1 -6
View File
@@ -16,7 +16,7 @@ import (
var psCommand = cli.Command{
Name: "ps",
Usage: "ps displays the processes running inside a container",
ArgsUsage: `<container-id> [-- ps options]`,
ArgsUsage: `<container-id> [ps options]`,
Flags: []cli.Flag{
cli.StringFlag{
Name: "format, f",
@@ -47,11 +47,6 @@ var psCommand = cli.Command{
// psArgs: [ps_arg1 ps_arg2 ...]
//
psArgs := context.Args()[1:]
if len(psArgs) > 0 && psArgs[0] == "--" {
psArgs = psArgs[1:]
}
if len(psArgs) == 0 {
psArgs = []string{"-ef"}
}