[Process] re-added the possibility to set the Process timeout to null (to disable it) (closes #4843)

This commit is contained in:
Fabien Potencier 2012-07-11 09:39:13 +02:00
parent 5da1bc6a4f
commit 50109ebcc2
2 changed files with 22 additions and 0 deletions

View File

@ -585,8 +585,19 @@ class Process
return $this->timeout;
}
/**
* Sets the process timeout.
*
* To disable the timeout, set this value to null.
*
* @param integer|null
*/
public function setTimeout($timeout)
{
if (null === $timeout) {
return null;
}
$timeout = (integer) $timeout;
if ($timeout < 0) {

View File

@ -81,8 +81,19 @@ class ProcessBuilder
return $this;
}
/**
* Sets the process timeout.
*
* To disable the timeout, set this value to null.
*
* @param integer|null
*/
public function setTimeout($timeout)
{
if (null === $timeout) {
return null;
}
$timeout = (integer) $timeout;
if ($timeout < 0) {