Skip to content

Commit

Permalink
Avoid shell for proc_terminate() test
Browse files Browse the repository at this point in the history
Otherwise we're sending the signal to the shell, not the sleep
process, and it will continue sleeping.

This also illustrates a minor issue without our array proc_open()
support: We don't preserve the passed arguments in the
proc_get_status() output.
  • Loading branch information
nikic committed Sep 24, 2021
1 parent c96be7b commit 2323dc2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ext/standard/tests/general_functions/proc_open02.phpt
Expand Up @@ -10,7 +10,7 @@ if (getenv('SKIP_SLOW_TESTS')) echo 'skip slow test';
$ds = array(array('pipe', 'r'));

$cat = proc_open(
'/bin/sleep 2',
['/bin/sleep', '2'],
$ds,
$pipes
);
Expand All @@ -34,7 +34,7 @@ echo "Done!\n";
bool(true)
array(8) {
["command"]=>
string(12) "/bin/sleep 2"
string(10) "/bin/sleep"
["pid"]=>
int(%d)
["running"]=>
Expand All @@ -53,7 +53,7 @@ array(8) {
bool(true)
array(8) {
["command"]=>
string(12) "/bin/sleep 2"
string(10) "/bin/sleep"
["pid"]=>
int(%d)
["running"]=>
Expand Down

0 comments on commit 2323dc2

Please sign in to comment.