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

dataroaring pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-3.0 by this push:
     new 0de658625e9 branch-3.0: [docs](fdb_ctl) remove fdbmonitor.pid file 
when stopping fdb #44053 (#44055)
0de658625e9 is described below

commit 0de658625e9a3dbfc95e89cc945b02b214ec0a73
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Sun Nov 17 21:11:06 2024 +0800

    branch-3.0: [docs](fdb_ctl) remove fdbmonitor.pid file when stopping fdb 
#44053 (#44055)
    
    Cherry-picked from #44053
    
    Co-authored-by: Shane <[email protected]>
---
 tools/fdb/fdb_ctl.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tools/fdb/fdb_ctl.sh b/tools/fdb/fdb_ctl.sh
index 845b905a91c..faa7b0bd8c2 100755
--- a/tools/fdb/fdb_ctl.sh
+++ b/tools/fdb/fdb_ctl.sh
@@ -353,12 +353,14 @@ function start_fdb() {
 }
 
 function stop_fdb() {
-    if [[ -f "${FDB_HOME}/fdbmonitor.pid" ]]; then
+    fdb_pid_file="${FDB_HOME}/fdbmonitor.pid"
+    if [[ -f "${fdb_pid_file}" ]]; then
         local fdb_pid
-        fdb_pid=$(cat "${FDB_HOME}/fdbmonitor.pid")
+        fdb_pid=$(cat "${fdb_pid_file}")
         if ps -p "${fdb_pid}" >/dev/null; then
             echo "Stop fdbmonitor with pid ${fdb_pid}"
             kill -9 "${fdb_pid}"
+            rm -f "${fdb_pid_file}"
         fi
     fi
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to