Sorry for my poor English.
When i use Ctr + c stop the bootRun but gradle daemon stop too. It's a waste of time
spring boot version 1.5.3.RELEASE gradle version 3.5
Thanks.
Comment From: wilkinsona
Thanks for getting in touch, but it feels like this is a question that would be better suited to Stack Overflow. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add some more details if you feel this is a genuine bug.
Comment From: mpox
actually it looks like a bug. when I hit stop button in IJ, Gradle is forcibly terminating bootRun, not shutting down gracefully
Comment From: wilkinsona
@mpox If that is a bug, it's a bug in your IDE. bootRun is a pretty-much-standard JavaExec task. As such, the way in which it is stopped is out of our control.
Comment From: mpox
@wilkinsona when I press CTRL+C in terminal it also forcibly terminates bootRun. still I see it as a bug in gradle, unless you show me how to stop gracefully in gradle
Comment From: wilkinsona
As I said above, that is out of our control as we're using Gradle's standard behavior for a JavaExec task. In a terminal, the behavior will depend on the terminal, it's signal handling and how that signal is propagated from the process running Gradle to the process that's running the application.
Comment From: mpox
so how is that, if I start the very same app directly in a terminal, from the java command, then signal handling works properly and shutdown hooks get executed as expected? or how is that if I set up java run config in IJ (without gradle in the middle) then it also works properly. for me it looks like gradle receives SIGTERM signal and it kills underlaying java app, looks literally like it would call System.exit()