use state machine management for exec.Pid()

Signed-off-by: Lifubang <lifubang@acmcoder.com>
This commit is contained in:
Lifubang
2018-11-23 17:46:32 +08:00
parent 32aa0cd79b
commit bbc2a995f9
3 changed files with 25 additions and 2 deletions

View File

@@ -69,3 +69,7 @@ func (s *deletedState) SetExited(status int) {
func (s *deletedState) Exec(ctx context.Context, path string, r *ExecConfig) (proc.Process, error) {
return nil, errors.Errorf("cannot exec in a deleted state")
}
func (s *deletedState) Pid() int {
return -1
}