Commit 2a04d94c authored by Ben Hale's avatar Ben Hale Committed by Andy Wilkinson

Use exec when launching the JVM in CLI's shell script

Previously, when the Spring Boot CLI ran the Java command line for an
application it did a straight invocation which suppressed propagation of
signals to the JVM in certain circumstances (e.g within Docker containers).

This change prepends the command with exec which causes the Java process to
replace the script process in a shell ensuring that signals are propagated to
the Java process without suppression.

See gh-17976
Signed-off-by: 's avatarBen Hale <bhale@pivotal.io>
parent bd9f7a13
...@@ -113,4 +113,4 @@ if $cygwin; then ...@@ -113,4 +113,4 @@ if $cygwin; then
fi fi
IFS=" " read -r -a javaOpts <<< "$JAVA_OPTS" IFS=" " read -r -a javaOpts <<< "$JAVA_OPTS"
"${JAVA_HOME}/bin/java" "${javaOpts[@]}" -cp "$CLASSPATH" org.springframework.boot.loader.JarLauncher "$@" exec "${JAVA_HOME}/bin/java" "${javaOpts[@]}" -cp "$CLASSPATH" org.springframework.boot.loader.JarLauncher "$@"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment