( reqCtx context.Context, req *taskAPI.DeleteRequest, taskService taskAPI.TaskService, )
| 263 | } |
| 264 | |
| 265 | func (m *taskManager) DeleteProcess( |
| 266 | reqCtx context.Context, |
| 267 | req *taskAPI.DeleteRequest, |
| 268 | taskService taskAPI.TaskService, |
| 269 | ) (*taskAPI.DeleteResponse, error) { |
| 270 | resp, err := taskService.Delete(reqCtx, req) |
| 271 | if err != nil { |
| 272 | return nil, err |
| 273 | } |
| 274 | |
| 275 | proc, err := m.deleteProc(req.ID, req.ExecID) |
| 276 | if err != nil { |
| 277 | return nil, err |
| 278 | } |
| 279 | |
| 280 | // Wait for the io streams to be flushed+closed before returning. Error is ignored |
| 281 | // here as any io error is already logged in the IOProxy implementation directly. |
| 282 | // Timeouts on waiting to close this channel after process exit are handled by the |
| 283 | // IOProxy implementation being used for this proc. There's no extra timeout here |
| 284 | // in order to keep things simpler. |
| 285 | <-proc.ioCopyDone |
| 286 | |
| 287 | return resp, nil |
| 288 | } |
| 289 | |
| 290 | func (m *taskManager) monitorExit(proc *vmProc, taskService taskAPI.TaskService) { |
| 291 | waitResp, waitErr := taskService.Wait(proc.ctx, &taskAPI.WaitRequest{ |
nothing calls this directly
no test coverage detected