Browse Source

docker top: fix command when multiple arguments are supplied

Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Erik Hollensbe 10 years ago
parent
commit
394a6d3154
1 changed files with 1 additions and 1 deletions
  1. 1 1
      daemon/top.go

+ 1 - 1
daemon/top.go

@@ -29,7 +29,7 @@ func (daemon *Daemon) ContainerTop(job *engine.Job) engine.Status {
 		if err != nil {
 			return job.Error(err)
 		}
-		output, err := exec.Command("ps", psArgs).Output()
+		output, err := exec.Command("ps", strings.Split(psArgs, " ")...).Output()
 		if err != nil {
 			return job.Errorf("Error running ps: %s", err)
 		}