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

Skip to content

[Process] Broken since v2.2.2 and the 0.2 second start-up timeout #8231

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

Closed
Bilge opened this issue Jun 9, 2013 · 2 comments
Closed

[Process] Broken since v2.2.2 and the 0.2 second start-up timeout #8231

Bilge opened this issue Jun 9, 2013 · 2 comments
Labels

Comments

@Bilge
Copy link
Contributor

Bilge commented Jun 9, 2013

Since v2.2.2 line 312 reads: $n = @stream_select($r, $w, $e, 0, ceil(static::TIMEOUT_PRECISION * 1E6));

If $n = 0 then it throws a RuntimeException, 'The process timed out.'.

This causes all my processes that are slow to start up (e.g. heavy Perl scripts) to fail because if they don't produce any output in 0.2 seconds they are terminated. This behaviour is nonsense and doesn't even respect the class's $timeout setting. It's fine to poll the process every 0.2 seconds but don't treat it as dead if it doesn't produce output in the first cycle.

@fabpot
Copy link
Member

fabpot commented Jun 13, 2013

ping @romainneutron

@romainneutron
Copy link
Contributor

This has been fixed in the Process::wait method, see https://github.com/symfony/symfony/blob/v2.2.2/src/Symfony/Component/Process/Process.php#L420, and this is indeed a bug that remains in the Process::start method.

I'll push a fix in the afternoon

fabpot added a commit that referenced this issue Jun 13, 2013
This PR was merged into the 2.2 branch.

Discussion
----------

[2.2][Process] Disable exception on stream_select timeout

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

Commits
-------

c0da3ae [Process] Disable exception on stream_select timeout
@fabpot fabpot closed this as completed Jun 13, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants