symfony/symfony — pull request #7583 by romainneutron (2013-04-06 19:03:18+00:00)
Title: [2.1][Process] Fix Process timeout

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

This PR fixes timeout in the process component.
Timeout can now be float values. The precision of the timeout is given by the `Process::TIMEOUT_PRECISION` constant.

Note : The timeout works when running the process with the `Process::run` method. When using the `Process::start` method, the `Process::checkTimeout` method should be regularly triggered to perform a check.

example :

```php
$process->start();

while ($condition) {
// some stuff
$process->checkTimeout(); // throws an Symfony\Process\Exception\RuntimeException if timeout is reached
usleep(1000);
}
```