Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Process] Fix infinite waiting for stopped process #31568

Merged
merged 1 commit into from May 22, 2019

Conversation

mshavliuk
Copy link

Q A
Branch? 3.4
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #31548
License MIT

Description

Add a regression test Symfony\Component\Process\Tests\ProcessTest:testWaitStoppedDeadProcess to reproduce the related bug #31548 . It consists of one file ErrorProcessInitiator.php, which executes as another process because otherwise if Process::wait() goes in an infinite loop (which is test checks) it will be impossible to handle it and stop test correctly.

The second commit contains bug fix, which is only $this->checkTimeout(); call, that prevents infinite loop.

@mshavliuk mshavliuk changed the title 3.4 [Process] Fix infinite waiting for stopped process May 21, 2019
@nicolas-grekas nicolas-grekas added this to the 3.4 milestone May 22, 2019
@nicolas-grekas
Copy link
Member

Thank you @mshavliuk.

@nicolas-grekas nicolas-grekas merged commit 6b9ee1e into symfony:3.4 May 22, 2019
nicolas-grekas added a commit that referenced this pull request May 22, 2019
…iuk)

This PR was squashed before being merged into the 3.4 branch (closes #31568).

Discussion
----------

[Process] Fix infinite waiting for stopped process

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #31548
| License       | MIT

### Description
Add a regression test `Symfony\Component\Process\Tests\ProcessTest:testWaitStoppedDeadProcess` to reproduce the related bug #31548 . It consists of one file `ErrorProcessInitiator.php`, which executes as another process because otherwise if `Process::wait()` goes in an infinite loop (which is test checks) it will be impossible to handle it and stop test correctly.

The second commit contains bug fix, which is only `$this->checkTimeout();` call, that prevents infinite loop.

Commits
-------

6b9ee1e [Process] Fix infinite waiting for stopped process
This was referenced May 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants