You are here

public function Process::setIdleTimeout in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/process/Process.php \Symfony\Component\Process\Process::setIdleTimeout()

Sets the process idle timeout (max. time since last output).

To disable the timeout, set this value to null.

Parameters

int|float|null $timeout The timeout in seconds:

Return value

self The current Process instance.

Throws

LogicException if the output is disabled

InvalidArgumentException if the timeout is negative

File

vendor/symfony/process/Process.php, line 903

Class

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

Namespace

Symfony\Component\Process

Code

public function setIdleTimeout($timeout) {
  if (null !== $timeout && $this->outputDisabled) {
    throw new LogicException('Idle timeout can not be set while the output is disabled.');
  }
  $this->idleTimeout = $this
    ->validateTimeout($timeout);
  return $this;
}