Skip to content

Commit bbfcde4

Browse files
committed
* fix 001-proc_open_basic
1 parent 745f582 commit bbfcde4

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

tests/exec/002-proc_open_multiple.phpt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,11 @@ spawn(function () use (&$results) {
3434
);
3535

3636
fclose($pipes[0]);
37-
$output = stream_get_contents($pipes[1]);
3837
fclose($pipes[1]);
3938
fclose($pipes[2]);
4039

4140
$exit_code = proc_close($process);
42-
$results[] = "Process 1: " . trim($output) . " (exit: $exit_code)";
41+
$results[] = "Process 1: exit: $exit_code";
4342
echo "Process 1 completed\n";
4443
});
4544

@@ -64,12 +63,11 @@ spawn(function () use (&$results) {
6463
);
6564

6665
fclose($pipes[0]);
67-
$output = stream_get_contents($pipes[1]);
6866
fclose($pipes[1]);
6967
fclose($pipes[2]);
7068

7169
$exit_code = proc_close($process);
72-
$results[] = "Process 2: " . trim($output) . " (exit: $exit_code)";
70+
$results[] = "Process 2: exit: $exit_code";
7371
echo "Process 2 completed\n";
7472
});
7573

tests/exec/003-proc_open_timeout.phpt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,11 @@ spawn(function () {
3333
);
3434

3535
fclose($pipes[0]);
36-
$output = stream_get_contents($pipes[1]);
3736
fclose($pipes[1]);
3837
fclose($pipes[2]);
3938

4039
$exit_code = proc_close($process);
41-
echo "Fast process output: " . trim($output) . " (exit: $exit_code)\n";
40+
echo "Fast process output: (exit: $exit_code)\n";
4241
});
4342

4443
spawn(function () {
@@ -63,12 +62,11 @@ spawn(function () {
6362
);
6463

6564
fclose($pipes[0]);
66-
$output = stream_get_contents($pipes[1]);
6765
fclose($pipes[1]);
6866
fclose($pipes[2]);
6967

7068
$exit_code = proc_close($process);
71-
echo "Slow process output: " . trim($output) . " (exit: $exit_code)\n";
69+
echo "Slow process output: (exit: $exit_code)\n";
7270
});
7371

7472
spawn(function() {
@@ -83,5 +81,5 @@ Timeout test completed
8381
Testing proc_open with fast process
8482
Testing proc_open with slow process
8583
Background task running
86-
Fast process output: Fast process (exit: 0)
87-
Slow process output: Slow process (exit: 0)
84+
Fast process output: (exit: 0)
85+
Slow process output: (exit: 0)

0 commit comments

Comments
 (0)