You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by ch...@apache.org on 2023/03/10 16:19:18 UTC

[kyuubi] branch master updated: [KYUUBI #4494] `bin/kyuubi` should use `exec` to run Kyuubi server

This is an automated email from the ASF dual-hosted git repository.

chengpan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kyuubi.git


The following commit(s) were added to refs/heads/master by this push:
     new f420238f4 [KYUUBI #4494] `bin/kyuubi` should use `exec` to run Kyuubi server
f420238f4 is described below

commit f420238f4f171bab9a04860c5cf7f6b2181621ec
Author: miaowang <mi...@gaojihealth.com>
AuthorDate: Sat Mar 11 00:19:04 2023 +0800

    [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 <mi...@gaojihealth.com>
    Signed-off-by: Cheng Pan <ch...@apache.org>
---
 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() {