spring-boot/spring-boot-project/spring-boot-tools
Andy Wilkinson 5765cfe010 Allow 5 seconds for child to handle SIGINT before destroying it
Previously, when RunProcess handled a SIGINT it would immediately
attempt to destroy the process that it had run. This created a race
condition between the SIGINT being handled by the child process
and RunProcess destroying the child. The exact behavior of destroy
is implementation dependent and it may result in forcible termination
of the process where shutdown hooks are not called. This is what
happens on Windows. The exit code in such a case is 1 which prevents
anything from waiting for the process to complete from detecting
that it ended as a result of a SIGINT, leaving it with no choice but
to report an error. This is what happens with mvn spring-boot:run
with a forked process on Windows and results in the build failing.

This commit updates RunProcess to allow the child process to handle
the SIGINT itself, waiting for up to five seconds for that to happen
before the process is then destroyed. Given this time, the child
process exits with 130 which RunMojo already handles correctly as
indicating that the process died due to SIGINT and the build completes
with success as a result.

Fixes gh-18936
2019-11-08 12:41:13 +00:00
..
spring-boot-antlib Correct SCM URLs in published poms 2019-10-02 10:48:30 +01:00
spring-boot-autoconfigure-processor Correct SCM URLs in published poms 2019-10-02 10:48:30 +01:00
spring-boot-configuration-metadata Correct SCM URLs in published poms 2019-10-02 10:48:30 +01:00
spring-boot-configuration-processor Prevent recursive config props from causing a stack overflow 2019-11-05 15:35:11 +00:00
spring-boot-gradle-plugin Test the Gradle Plugin against Gradle 5.6.4 2019-11-04 09:56:12 +01:00
spring-boot-loader Correct SCM URLs in published poms 2019-10-02 10:48:30 +01:00
spring-boot-loader-tools Allow 5 seconds for child to handle SIGINT before destroying it 2019-11-08 12:41:13 +00:00
spring-boot-maven-plugin Correct SCM URLs in published poms 2019-10-02 10:48:30 +01:00
spring-boot-test-support Correct SCM URLs in published poms 2019-10-02 10:48:30 +01:00
pom.xml Correct SCM URLs in published poms 2019-10-02 10:48:30 +01:00