Add ctr attach for reattaching to running task

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2017-06-08 10:16:40 -07:00
parent a6314cad65
commit 5d1669bcfb
5 changed files with 87 additions and 4 deletions

View File

@@ -7,6 +7,7 @@ import (
"fmt"
"io"
"runtime"
"strings"
"syscall"
"github.com/containerd/containerd/api/services/containers"
@@ -127,7 +128,7 @@ func (t *task) Status(ctx context.Context) (TaskStatus, error) {
if err != nil {
return "", err
}
return TaskStatus(r.Task.Status.String()), nil
return TaskStatus(strings.ToLower(r.Task.Status.String())), nil
}
// Wait is a blocking call that will wait for the task to exit and return the exit status