mirror of
https://github.com/opencontainers/runc.git
synced 2026-02-05 09:46:08 +01:00
container can be in stopped status from create process.
Signed-off-by: CuiHaozhi <cuihaozhi@chinacloud.com.cn>
This commit is contained in:
2
exec.go
2
exec.go
@@ -115,7 +115,7 @@ func execProcess(context *cli.Context) (int, error) {
|
||||
return -1, err
|
||||
}
|
||||
if status == libcontainer.Stopped {
|
||||
return -1, fmt.Errorf("cannot exec a container that has run and stopped")
|
||||
return -1, fmt.Errorf("cannot exec a container that has stopped")
|
||||
}
|
||||
path := context.String("process")
|
||||
if path == "" && len(context.Args()) == 1 {
|
||||
|
||||
2
start.go
2
start.go
@@ -47,7 +47,7 @@ your host.`,
|
||||
hasError = true
|
||||
}
|
||||
case libcontainer.Stopped:
|
||||
fmt.Fprintln(os.Stderr, "cannot start a container that has run and stopped")
|
||||
fmt.Fprintln(os.Stderr, "cannot start a container that has stopped")
|
||||
hasError = true
|
||||
case libcontainer.Running:
|
||||
fmt.Fprintln(os.Stderr, "cannot start an already running container")
|
||||
|
||||
Reference in New Issue
Block a user