@@ -25,20 +25,21 @@ import (
2525
2626 "github.com/containerd/console"
2727 "github.com/containerd/containerd/errdefs"
28+ "github.com/containerd/containerd/runtime/proc"
2829 "github.com/containerd/fifo"
2930 runc "github.com/containerd/go-runc"
3031 google_protobuf "github.com/gogo/protobuf/types"
3132 "github.com/pkg/errors"
3233)
3334
3435type initState interface {
35- State
36+ proc. State
3637
3738 Pause (context.Context ) error
3839 Resume (context.Context ) error
3940 Update (context.Context , * google_protobuf.Any ) error
4041 Checkpoint (context.Context , * CheckpointConfig ) error
41- Exec (context.Context , string , * ExecConfig ) (Process , error )
42+ Exec (context.Context , string , * ExecConfig ) (proc. Process , error )
4243}
4344
4445type createdState struct {
@@ -130,7 +131,7 @@ func (s *createdState) SetExited(status int) {
130131 }
131132}
132133
133- func (s * createdState ) Exec (ctx context.Context , path string , r * ExecConfig ) (Process , error ) {
134+ func (s * createdState ) Exec (ctx context.Context , path string , r * ExecConfig ) (proc. Process , error ) {
134135 s .p .mu .Lock ()
135136 defer s .p .mu .Unlock ()
136137 return s .p .exec (ctx , path , r )
@@ -272,7 +273,7 @@ func (s *createdCheckpointState) SetExited(status int) {
272273 }
273274}
274275
275- func (s * createdCheckpointState ) Exec (ctx context.Context , path string , r * ExecConfig ) (Process , error ) {
276+ func (s * createdCheckpointState ) Exec (ctx context.Context , path string , r * ExecConfig ) (proc. Process , error ) {
276277 s .p .mu .Lock ()
277278 defer s .p .mu .Unlock ()
278279
@@ -364,7 +365,7 @@ func (s *runningState) SetExited(status int) {
364365 }
365366}
366367
367- func (s * runningState ) Exec (ctx context.Context , path string , r * ExecConfig ) (Process , error ) {
368+ func (s * runningState ) Exec (ctx context.Context , path string , r * ExecConfig ) (proc. Process , error ) {
368369 s .p .mu .Lock ()
369370 defer s .p .mu .Unlock ()
370371 return s .p .exec (ctx , path , r )
@@ -456,7 +457,7 @@ func (s *pausedState) SetExited(status int) {
456457 }
457458}
458459
459- func (s * pausedState ) Exec (ctx context.Context , path string , r * ExecConfig ) (Process , error ) {
460+ func (s * pausedState ) Exec (ctx context.Context , path string , r * ExecConfig ) (proc. Process , error ) {
460461 s .p .mu .Lock ()
461462 defer s .p .mu .Unlock ()
462463
@@ -536,7 +537,7 @@ func (s *stoppedState) SetExited(status int) {
536537 // no op
537538}
538539
539- func (s * stoppedState ) Exec (ctx context.Context , path string , r * ExecConfig ) (Process , error ) {
540+ func (s * stoppedState ) Exec (ctx context.Context , path string , r * ExecConfig ) (proc. Process , error ) {
540541 s .p .mu .Lock ()
541542 defer s .p .mu .Unlock ()
542543
0 commit comments