Symfony\Component\Process\Process::setIdleTimeout PHP Method

setIdleTimeout() public method

To disable the timeout, set this value to null.
public setIdleTimeout ( integer | float | null $timeout ) : self
$timeout integer | float | null The timeout in seconds
return self The current Process instance
    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;
    }

Usage Example

 /**
  * Creates new Symfony process with given arguments.
  *
  * @param string       $commandline  The command line to run.
  * @param integer|null $idle_timeout Idle timeout.
  *
  * @return Process
  */
 public function createProcess($commandline, $idle_timeout = null)
 {
     $process = new Process($commandline);
     $process->setTimeout(null);
     $process->setIdleTimeout($idle_timeout);
     return $process;
 }
All Usage Examples Of Symfony\Component\Process\Process::setIdleTimeout