Skip to content

Commit 6e886f0

Browse files
committed
Fix #72676: Test cli_process_title_unix fails on AIX
Patch provided by matthieu dot sarter dot external at atos dot net.
1 parent ee6900c commit 6e886f0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

sapi/cli/tests/cli_process_title_unix.phpt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@ $pid = getmypid();
1515
if (cli_set_process_title($original_title) === true)
1616
echo "Successfully set title\n";
1717

18-
$ps_output = shell_exec("ps -p $pid -o command | tail -n 1");
18+
$ps_process_title_field = "command";
19+
if (strtoupper(substr(PHP_OS, 0, 3)) == "AIX")
20+
{
21+
$ps_process_title_field = "args";
22+
}
23+
$ps_output = shell_exec("ps -p $pid -o $ps_process_title_field | tail -n 1");
1924

2025
if ($ps_output === null)
2126
{

0 commit comments

Comments
 (0)