Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Component\Process\Process reads stream input only once on Process::start/run #18262

Closed
@akomm

Description

@akomm

I want to implement a Command, which starts a child Process and interacts with it at certain points by writing into its STDIN. I did similar with proc_open a while ago and I know it is possible with the process API, which PHP provides, using the nonblocking option and pseudo terminal. The Process component provides an "async" API to run a process, but no means to write to the STDIN during the execution. Only once at start time.

The entire testcase only checks the stream feature writing to the stream prior the execution:

https://github.com/romainneutron/symfony/blob/e19ce573bc26f64fec610181cd96425af54389fa/src/Symfony/Component/Process/Tests/AbstractProcessTest.php#L164-L181

Not during.

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