| 558 | } |
| 559 | |
| 560 | func (l *local) CloseIO(ctx context.Context, r *api.CloseIORequest, _ ...grpc.CallOption) (*ptypes.Empty, error) { |
| 561 | t, err := l.getTask(ctx, r.ContainerID) |
| 562 | if err != nil { |
| 563 | return nil, err |
| 564 | } |
| 565 | p := runtime.Process(t) |
| 566 | if r.ExecID != "" { |
| 567 | if p, err = t.Process(ctx, r.ExecID); err != nil { |
| 568 | return nil, errgrpc.ToGRPC(err) |
| 569 | } |
| 570 | } |
| 571 | if r.Stdin { |
| 572 | if err := p.CloseIO(ctx); err != nil { |
| 573 | return nil, errgrpc.ToGRPC(err) |
| 574 | } |
| 575 | } |
| 576 | return empty, nil |
| 577 | } |
| 578 | |
| 579 | func (l *local) Checkpoint(ctx context.Context, r *api.CheckpointTaskRequest, _ ...grpc.CallOption) (*api.CheckpointTaskResponse, error) { |
| 580 | container, err := l.getContainer(ctx, r.ContainerID) |