From 1ed89083bedcd33000533e5ad0da31f6ecdcd4a0 Mon Sep 17 00:00:00 2001 From: miltalex Date: Thu, 23 Jul 2020 10:32:14 +0300 Subject: [PATCH] [executor] use OCC pid to kill task on ERROR --- executor/executable/controllabletask.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/executor/executable/controllabletask.go b/executor/executable/controllabletask.go index 1ae85303a..8d93a0812 100644 --- a/executor/executable/controllabletask.go +++ b/executor/executable/controllabletask.go @@ -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")