mirror of
https://source.quilibrium.com/quilibrium/ceremonyclient.git
synced 2024-12-25 08:05:17 +00:00
another bug fix (#53)
This commit is contained in:
parent
27aa02383c
commit
a441e5455f
@ -2,14 +2,13 @@
|
|||||||
|
|
||||||
start_process() {
|
start_process() {
|
||||||
GOEXPERIMENT=arenas go run ./... &
|
GOEXPERIMENT=arenas go run ./... &
|
||||||
local process_pid=$!
|
main_process_id=$!
|
||||||
local child_process_pid=$(pgrep -P $process_pid)
|
local child_process_pid=$(pgrep -P $main_process_id)
|
||||||
echo "Process started with PID $process_pid and child PID $child_process_pid"
|
echo "process started with PID $main_process_id and child PID $child_process_pid"
|
||||||
}
|
}
|
||||||
|
|
||||||
is_process_running() {
|
is_process_running() {
|
||||||
local process_pid=$(ps -ef | grep "exe/node" | grep -v grep | awk '{print $2}')
|
ps -p $main_process_id > /dev/null 2>&1
|
||||||
ps -p $process_pid > /dev/null 2>&1
|
|
||||||
return $?
|
return $?
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,7 +39,7 @@ start_process
|
|||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
if ! is_process_running; then
|
if ! is_process_running; then
|
||||||
echo "Process crashed or stopped. Restarting..."
|
echo "process crashed or stopped. restarting..."
|
||||||
start_process
|
start_process
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user