func (t *task) Pid() uint32 {
	return t.pid
}
Pid returns the pid or process id for the task
package containerd
import (
	"bytes"
	"context"
	"encoding/json"
	"fmt"
	"io"
	goruntime "runtime"
	"strings"
	"syscall"
	"time"
	"github.com/containerd/containerd/api/services/tasks/v1"
	"github.com/containerd/containerd/api/types"
	"github.com/containerd/containerd/cio"
	"github.com/containerd/containerd/content"
	"github.com/containerd/containerd/diff"
	"github.com/containerd/containerd/errdefs"
	"github.com/containerd/containerd/images"
	"github.com/containerd/containerd/mount"
	"github.com/containerd/containerd/oci"
	"github.com/containerd/containerd/plugin"
	"github.com/containerd/containerd/rootfs"
	"github.com/containerd/containerd/runtime/linux/runctypes"
	"github.com/containerd/containerd/runtime/v2/runc/options"
	"github.com/containerd/typeurl"
	google_protobuf "github.com/gogo/protobuf/types"
	digest "github.com/opencontainers/go-digest"
	is "github.com/opencontainers/image-spec/specs-go"
	v1 "github.com/opencontainers/image-spec/specs-go/v1"
	specs "github.com/opencontainers/runtime-spec/specs-go"
	"github.com/pkg/errors"
)
const UnknownExitStatus = 255
const (
	checkpointDateFormat = "01-02-2006-15:04:05"
	checkpointNameFormat = "containerd.io/checkpoint/%s:%s"
)
type Status struct {
	Status ProcessStatus
	ExitStatus uint32
	ExitTime time.Time
}
type ProcessInfo struct {
	Pid uint32
	Info *google_protobuf.Any
}
type ProcessStatus string
const (
	Running ProcessStatus = "running"
	Created ProcessStatus = "created"
	Stopped ProcessStatus = "stopped"
	Paused ProcessStatus = "paused"
	Pausing ProcessStatus = "pausing"
	Unknown ProcessStatus = "unknown"
)
type IOCloseInfo struct {
	Stdin bool
}
type IOCloserOpts func(*IOCloseInfo)
func WithStdinCloser(r *IOCloseInfo) {
	r.Stdin = true
}
type CheckpointTaskInfo struct {
	Name string
	ParentCheckpoint digest.Digest
	Options interface{}
	runtime string
}
func (i *CheckpointTaskInfo) Runtime() string {
	return i.runtime
}
type CheckpointTaskOpts func(*CheckpointTaskInfo) error
type TaskInfo struct {
	Checkpoint *types.Descriptor
	RootFS []mount.Mount
	Options interface{}
	runtime string
}
func (i *TaskInfo) Runtime() string {
	return i.runtime
}
type Task interface {
	Process
	Pause(context.Context) error
	Resume(context.Context) error
	Exec(context.Context, string, *specs.Process, cio.Creator) (Process, error)
	Pids(context.Context) ([]ProcessInfo, error)
	Checkpoint(context.Context, ...CheckpointTaskOpts) (Image, error)
	Update(context.Context, ...UpdateTaskOpts) error
	LoadProcess(context.Context, string, cio.Attach) (Process, error)
	Metrics(context.Context) (*types.Metric, error)
	Spec(context.Context) (*oci.Spec, error)
}
var _ = (Task)(&task{})
type task struct {
	client *Client
	c      Container
	io  cio.IO
	id  string
	pid uint32
}
func (t *task) Spec(ctx context.Context) (*oci.Spec, error) {
	return t.c.Spec(ctx)
}
func (t *task) ID() string {
	return t.id
}