diff --git a/src/taskstub.js.c b/src/taskstub.js.c index 752c291d..ef304d31 100644 --- a/src/taskstub.js.c +++ b/src/taskstub.js.c @@ -455,7 +455,10 @@ static JSValue _taskstub_execute(JSContext* context, JSValueConst this_val, int static JSValue _taskstub_kill(JSContext* context, JSValueConst this_val, int argc, JSValueConst* argv) { tf_taskstub_t* stub = JS_GetOpaque(this_val, _classId); - uv_process_kill(&stub->_process, SIGTERM); + if (!tf_task_get_one_proc(stub->_owner)) + { + uv_process_kill(&stub->_process, SIGTERM); + } return JS_UNDEFINED; }