Skip to content

Commit 1ed8908

Browse files
miltalexteo
authored andcommitted
[executor] use OCC pid to kill task on ERROR
1 parent e970ce6 commit 1ed8908

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

executor/executable/controllabletask.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ func (t *ControllableTask) Launch() error {
185185
break
186186
} else if reachedState == "DONE" || reachedState == "ERROR" {
187187
// something went wrong, the device moved to DONE or ERROR on startup
188-
_ = syscall.Kill(-taskCmd.Process.Pid, syscall.SIGKILL)
188+
_ = syscall.Kill(int(response.GetPid()), syscall.SIGKILL)
189189

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

0 commit comments

Comments
 (0)