public function Process::setTimeout

Sets the process timeout.

To disable the timeout, set this value to null.

Parameters

integer|null:

1 call to Process::setTimeout()

File

drupal/core/vendor/symfony/process/Symfony/Component/Process/Process.php, line 614

Class

Process
Process is a thin wrapper around proc_* functions to ease start independent PHP processes.

Namespace

Symfony\Component\Process

Code

public function setTimeout($timeout) {
  if (null === $timeout) {
    $this->timeout = null;
    return;
  }
  $timeout = (int) $timeout;
  if ($timeout < 0) {
    throw new \InvalidArgumentException('The timeout value must be a valid positive integer.');
  }
  $this->timeout = $timeout;
}