Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.6k
Closed
Description
Symfony version(s) affected
all
Description
When running a process, with PTY=true, the output (STDOUT) is not well captured.
Sometimes, it does not work. It looks like the output is instead saved in STDERR
How to reproduce
<?phprequire'vendor/autoload.php';useSymfony\Component\Process\Process;$reference =run_process();echo"Output Reference:\n";echo$reference;echo"\n";for ($i=0;$i <100_000;$i++) {if ($i >0 &&$i %80 ===0) {echo"\n"; }echo'.';$output =run_process();if ($output !==$reference) {echo"\n!!Output changed!!\n";echo"New output:\n";echo"$output\n";exit(1); }}functionrun_process(){$process =newProcess(['cat',__FILE__]);// If you comment the following line, the test become stable$process->setPty(true);$process->mustRun();return$process->getOutput();}
Possible Solution
No response
Additional Context
No response