lhotari commented on a change in pull request #2857:
URL: https://github.com/apache/bookkeeper/pull/2857#discussion_r736428188



##########
File path: docker/scripts/entrypoint.sh
##########
@@ -41,11 +41,11 @@ function run_command() {
         chmod -R +x ${BINDIR}
         chmod -R +x ${SCRIPTS_DIR}
         echo "This is root, will use user $BK_USER to run command '$@'"
-        sudo -s -E -u "$BK_USER" /bin/bash "$@"
+        exec sudo -s -E -u "$BK_USER" /bin/bash "$@"

Review comment:
       That's true that it "works" from the SIGTERM signalling point of view. 
My comments are more about the existing solution that was in place.
   It just seems odd that there isn't a symmetry to the other execution path 
where sudo isn't used. ` sudo -s -E -u "$BK_USER" /bin/bash "$@"` expects that 
the command is always a bash script. 
   the equivalent of `exec "$@"` with sudo would be something like `exec sudo 
-s -E -u "$BK_USER" /bin/bash -c 'exec "$@"' -- "$@"` . It probably doesn't 
make difference in this context.
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to