Any advice for properly shutting down forked proce...
# community-support
m
Any advice for properly shutting down forked processes? I'm using com.github.node-gradle.node, which creates a node process that isn't shut down by gradle's interrupt signal. Apparently, it's more of a gradle issue than an issue with the plugin (https://github.com/gradle/gradle/issues/7603). in the meantime, is there a proper way to handle this? Is it a good use case for finalizedBy?
v
Finalized by will not help, if you stop the run there will not be those additional tasks started. And it is not the appropriate way anyway. To start and stop a server around one or multiple tasks, you would use a build service that implements auto closeable. Whether that is considered when you Ctrl-c though I don't know. Java in general is not really good in handling OS signals usually.
m
I see, thanks for letting me know about build services. Seems like this is in the works for the plugin.
👌 1
d
Unfortunately not much that I can do from the plugin's perspective, we use Gradle's frameworks for running the process and since Gradle is losing track it sort of leaves two options: • Implement the tracking in the plugin • Wrap every Exec with an util that can handle this And both seem like bad fits for the plugin