Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Process] Output capture with PTY=true does not work very well #59927

Closed
@lyrixx

Description

@lyrixx

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp