diff --git a/libcontainer/factory_linux.go b/libcontainer/factory_linux.go index 60d9641f0cf..842fa8c15e2 100644 --- a/libcontainer/factory_linux.go +++ b/libcontainer/factory_linux.go @@ -164,7 +164,7 @@ func (l *LinuxFactory) Create(id string, config *configs.Config) (Container, err if err != nil { return nil, newGenericError(fmt.Errorf("delete the directory: %s", containerRoot), IdInUse) } - procPath := fmt.Sprintf("/proc/%s/cmdline", pid) + procPath := filepath.Join("/proc", string(pid), "/cmdline") cmdline, err := ioutil.ReadFile(procPath) if err != nil { return nil, newGenericError(fmt.Errorf("delete the directory: %s", containerRoot), IdInUse)