Unverified Commit ef92f507 authored by Yossi Gottlieb's avatar Yossi Gottlieb Committed by GitHub
Browse files

Fix tests failure on busybox systems. (#7916)

parent f328194d
......@@ -94,7 +94,7 @@ proc kill_server config {
proc is_alive config {
set pid [dict get $config pid]
if {[catch {exec ps -p $pid} err]} {
if {[catch {exec kill -0 $pid} err]} {
return 0
} else {
return 1
......
......@@ -508,7 +508,7 @@ proc populate {num prefix size} {
proc get_child_pid {idx} {
set pid [srv $idx pid]
if {[string match {*Darwin*} [exec uname -a]]} {
if {[file exists "/usr/bin/pgrep"]} {
set fd [open "|pgrep -P $pid" "r"]
set child_pid [string trim [lindex [split [read $fd] \n] 0]]
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment