Skip to content

Commit

Permalink
Fix tests failure on busybox systems. (redis#7916)
Browse files Browse the repository at this point in the history
  • Loading branch information
yossigo authored Oct 18, 2020
1 parent f328194 commit ef92f50
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/support/server.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/support/util.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit ef92f50

Please sign in to comment.