gavinchou commented on code in PR #40223:
URL: https://github.com/apache/doris/pull/40223#discussion_r1739852747


##########
cloud/script/start.sh:
##########
@@ -131,14 +131,22 @@ fi
 
 mkdir -p "${DORIS_HOME}/log"
 echo "starts ${process} with args: $*"
+out_file=${DORIS_HOME}/log/${process}.out
 if [[ "${RUN_DAEMON}" -eq 1 ]]; then
-    date >>"${DORIS_HOME}/log/${process}.out"
-    nohup "${bin}" "$@" >>"${DORIS_HOME}/log/${process}.out" 2>&1 &
-    # wait for log flush
-    sleep 1.5
-    tail -n10 "${DORIS_HOME}/log/${process}.out" | grep 'working directory' 
-B1 -A10
-    echo "please check process log for more details"
-    echo ""
+    # append 10 blank lines to ensure the following tail -n10 works correctly
+    printf "\n\n\n\n\n\n\n\n\n\n" >> "${out_file}"
+    echo "$(date +'%F %T') try to start ${process}" >> "${out_file}"
+    nohup "${bin}" "$@" >> "${out_file}" 2>&1 &

Review Comment:
   ```suggestion
       printf "\n\n\n\n\n\n\n\n\n\n" >>"${out_file}"
       echo "$(date +'%F %T') try to start ${process}" >>"${out_file}"
       nohup "${bin}" "$@" >>"${out_file}" 2>&1 &
   ```



-- 
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]


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

Reply via email to