From f420238f4f171bab9a04860c5cf7f6b2181621ec Mon Sep 17 00:00:00 2001 From: miaowang Date: Sat, 11 Mar 2023 00:19:04 +0800 Subject: [PATCH] [KYUUBI #4494] `bin/kyuubi` should use `exec` to run Kyuubi server ### _Why are the changes needed?_ The difference between w/ and w/o `exec` in shell script https://www.baeldung.com/linux/exec-command-in-shell-script > When using exec, however, the command following exec replaces the current shell. This means no subshell is created and the current process is replaced with this new command. We must do this change to make `bin/kyuubi` suitable for Cloudera Manager. ### _How was this patch tested?_ - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [ ] [Run test](https://kyuubi.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request Closes #4494 from wangmiao1002/master. Closes #4494 ed9320447 [miaowang] Modify script run_kyuubi mode Authored-by: miaowang Signed-off-by: Cheng Pan --- bin/kyuubi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/kyuubi b/bin/kyuubi index 9bcca2c46..9132aae39 100755 --- a/bin/kyuubi +++ b/bin/kyuubi @@ -155,7 +155,7 @@ function start_kyuubi() { function run_kyuubi() { echo "Starting $CLASS" - nice -n "${KYUUBI_NICENESS:-0}" ${cmd} + exec nice -n "${KYUUBI_NICENESS:-0}" ${cmd} } function stop_kyuubi() {