(ctx context.Context, s syscall.Signal, opts ...KillOpts)
| 144 | } |
| 145 | |
| 146 | func (p *process) Kill(ctx context.Context, s syscall.Signal, opts ...KillOpts) error { |
| 147 | ctx, span := tracing.StartSpan(ctx, "process.Kill", |
| 148 | tracing.WithAttribute("process.id", p.ID()), |
| 149 | tracing.WithAttribute("process.pid", int(p.Pid())), |
| 150 | tracing.WithAttribute("process.task.id", p.task.ID()), |
| 151 | ) |
| 152 | defer span.End() |
| 153 | var i KillInfo |
| 154 | for _, o := range opts { |
| 155 | if err := o(ctx, &i); err != nil { |
| 156 | return err |
| 157 | } |
| 158 | } |
| 159 | _, err := p.task.client.TaskService().Kill(ctx, &tasks.KillRequest{ |
| 160 | Signal: uint32(s), |
| 161 | ContainerID: p.task.id, |
| 162 | ExecID: p.id, |
| 163 | All: i.All, |
| 164 | }) |
| 165 | return errgrpc.ToNative(err) |
| 166 | } |
| 167 | |
| 168 | func (p *process) Wait(ctx context.Context) (<-chan ExitStatus, error) { |
| 169 | c := make(chan ExitStatus, 1) |
nothing calls this directly
no test coverage detected