summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorTao ZHOU <angeloudy@gmail.com>2018-11-29 12:36:57 +1100
committerGitHub <noreply@github.com>2018-11-29 12:36:57 +1100
commit216d5f78995b73e3f1372ca9bb7315731932e1c8 (patch)
tree5b884bd838c984c74b0ab358da3eadb48b647011 /scripts
parent0e794c6a692cb9a3a067c12f37163c6c5dd9f2c4 (diff)
downloadmariadb-git-216d5f78995b73e3f1372ca9bb7315731932e1c8.tar.gz
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.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/wsrep_sst_mariabackup.sh5
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/wsrep_sst_mariabackup.sh b/scripts/wsrep_sst_mariabackup.sh
index 57805f73c47..c3b60d1bc07 100644
--- a/scripts/wsrep_sst_mariabackup.sh
+++ b/scripts/wsrep_sst_mariabackup.sh
@@ -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