diff --git a/sapi/cli/tests/php_cli_server_pdeathsig.phpt b/sapi/cli/tests/php_cli_server_pdeathsig.phpt index 66a76a84ccaf..c56baec058fb 100644 --- a/sapi/cli/tests/php_cli_server_pdeathsig.phpt +++ b/sapi/cli/tests/php_cli_server_pdeathsig.phpt @@ -9,7 +9,8 @@ if (!(str_contains(PHP_OS, 'Linux') || str_contains(PHP_OS, 'FreeBSD'))) { die('skip PDEATHSIG is only supported on Linux and FreeBSD'); } if (@file_exists('/.dockerenv')) die("skip Broken in Docker"); -if (!shell_exec("which pgrep")) die("skip Missing pgrep command"); +if (!function_exists('shell_exec')) die("skip shell_exec() is not available"); +if (!shell_exec("command -v pgrep")) die("skip Missing pgrep command"); ?> --FILE-- /dev/null && echo 1') !== null) { + $workers[] = $pid; + } + } + return $workers; } include "php_cli_server.inc";