Skip to content
Permalink
Browse files
use ps -p instead of ps --pid
make it compatible on FreeBSD.
If the parent process does not exist, there's no need to kill it.
  • Loading branch information
angeloudy committed Nov 29, 2018
1 parent 0e794c6 commit 216d5f7
Showing 1 changed file with 2 additions and 3 deletions.
@@ -651,13 +651,12 @@ monitor_process()

while true ; do

if ! ps --pid "${WSREP_SST_OPT_PARENT}" &>/dev/null; then
if ! ps -p "${WSREP_SST_OPT_PARENT}" &>/dev/null; then
wsrep_log_error "Parent mysqld process (PID:${WSREP_SST_OPT_PARENT}) terminated unexpectedly."
kill -- -"${WSREP_SST_OPT_PARENT}"
exit 32
fi

if ! ps --pid "${sst_stream_pid}" &>/dev/null; then
if ! ps -p "${sst_stream_pid}" &>/dev/null; then
break
fi

0 comments on commit 216d5f7

Please sign in to comment.