# Turn off gradle deamon for a task from a plugin

**URL:** <https://discuss.gradle.org/t/turn-off-gradle-deamon-for-a-task-from-a-plugin/24699>\
**Category:** Plugin Portal\
**Created:** [November 8, 2017, 8:40am UTC](https://discuss.gradle.org/t/turn-off-gradle-deamon-for-a-task-from-a-plugin/24699 "2017-11-08T08:40:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mendlik](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/mendlik/32/4970_2.png) [@mendlik](https://discuss.gradle.org/u/mendlik)\
**Post date:** [November 8, 2017, 8:40am UTC](https://discuss.gradle.org/t/turn-off-gradle-deamon-for-a-task-from-a-plugin/24699/1 "2017-11-08T08:40:27Z")

</div>

There is a [gradle-node-plugin](https://github.com/srs/gradle-node-plugin). It is a very useful gradle plugin that helps to execute node scripts.

One of my tasks in gradle starts an infinite node task called “watch”. This task stops on `Ctrl + c`. Unfortunately when I kill gradle task the `SIGKILL` does not propagate to the npm task.

I have created an [issue](https://github.com/srs/gradle-node-plugin/issues/238#issuecomment-342490151) on plugin’s github repository. Although it seem to be a limitation of gradle itself.

Has anyone faced this problem/limitation before?

---

<div class="post-metadata">

**Author:** ![orange-buffalo](https://avatars.discourse-cdn.com/v4/letter/o/94ad74/32.png) [@orange-buffalo](https://discuss.gradle.org/u/orange-buffalo)\
**Post date:** [November 8, 2017, 6:10pm UTC](https://discuss.gradle.org/t/turn-off-gradle-deamon-for-a-task-from-a-plugin/24699/2 "2017-11-08T18:10:14Z")

</div>

Looks like there is a very detailed explanation about Gradle daemon / client behaviour on `Ctrl + C` in related Gradle issue: [https://github.com/gradle/gradle/issues/1128#issuecomment-271299381](https://github.com/gradle/gradle/issues/1128#issuecomment-271299381). Although it is about `JavaExec` task, `gradle-node-plugin` uses similar mechanism to launch Node. Perhaps implementation for this issue could cover other cases of `exec` usage, including `gradle-node-plugin`.
