From a7c2f92c031d5e8493164f2c6869d50879a308e6 Mon Sep 17 00:00:00 2001 From: Peter Story <peter.garth.story@gmail.com> Date: Thu, 19 Aug 2021 16:10:19 -0400 Subject: [PATCH] Pass SIGTERM to root process's child This ensures that the container will exit cleanly, rather than waiting 10 seconds for processes to receive SIGKILL. --- repos/jekyll/copy/all/usr/jekyll/bin/jekyll | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/repos/jekyll/copy/all/usr/jekyll/bin/jekyll b/repos/jekyll/copy/all/usr/jekyll/bin/jekyll index 4ae2ba7..2b1ed08 100755 --- a/repos/jekyll/copy/all/usr/jekyll/bin/jekyll +++ b/repos/jekyll/copy/all/usr/jekyll/bin/jekyll @@ -2,6 +2,8 @@ [ "$DEBUG" = "true" ] && set -x set -e +trap 'kill -SIGTERM ${!}' TERM + args=$(default-args "$@") # @@ -33,4 +35,4 @@ sup_args="" exe=$BUNDLE_BIN/jekyll [ "$JEKYLL_DOCKER_TAG" = "pages" ] && sup_args="-r github-pages" [ -x "$exe" ] && exec su-exec jekyll bundle exec ruby $sup_args $exe $args -su-exec jekyll ruby $sup_args "$GEM_BIN/jekyll" $args +su-exec jekyll ruby $sup_args "$GEM_BIN/jekyll" $args & wait ${!} -- GitLab