Skip to content

Commit

Permalink
[executor] use OCC pid to kill task on ERROR
Browse files Browse the repository at this point in the history
  • Loading branch information
miltalex authored and teo committed Jul 23, 2020
1 parent e970ce6 commit 1ed8908
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion executor/executable/controllabletask.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ func (t *ControllableTask) Launch() error {
break
} else if reachedState == "DONE" || reachedState == "ERROR" {
// something went wrong, the device moved to DONE or ERROR on startup
_ = syscall.Kill(-taskCmd.Process.Pid, syscall.SIGKILL)
_ = syscall.Kill(int(response.GetPid()), syscall.SIGKILL)

log.WithField("task", t.ti.Name).Debug("task killed")
t.sendStatus(mesos.TASK_FAILED, "task reached wrong state on startup")
Expand Down

0 comments on commit 1ed8908

Please sign in to comment.