File tree Expand file tree Collapse file tree 2 files changed +6
-10
lines changed
Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
4443spawn (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
7472spawn (function () {
@@ -83,5 +81,5 @@ Timeout test completed
8381Testing proc_open with fast process
8482Testing proc_open with slow process
8583Background 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)
You can’t perform that action at this time.
0 commit comments