Skip to content

Commit 8ea28ff

Browse files
authored
Merge pull request #3117 from crosbymichael/exec-load
Fastpath opt and ExecProcess loading
2 parents fc44aa8 + 388c8a1 commit 8ea28ff

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

oci/spec_opts.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -774,6 +774,7 @@ func removeCap(caps *[]string, s string) {
774774
for i, c := range *caps {
775775
if c == s {
776776
*caps = append((*caps)[:i], (*caps)[i+1:]...)
777+
return
777778
}
778779
}
779780
}

task.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,9 @@ func (t *task) Update(ctx context.Context, opts ...UpdateTaskOpts) error {
521521
}
522522

523523
func (t *task) LoadProcess(ctx context.Context, id string, ioAttach cio.Attach) (Process, error) {
524+
if id == t.id && ioAttach == nil {
525+
return t, nil
526+
}
524527
response, err := t.client.TaskService().Get(ctx, &tasks.GetRequest{
525528
ContainerID: t.id,
526529
ExecID: id,

0 commit comments

Comments
 (0)