You are here

public function Process::disableOutput in Zircon Profile 8.0

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

Disables fetching output and error output from the underlying process.

Return value

Process

Throws

RuntimeException In case the process is already running

LogicException if an idle timeout is set

File

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

Class

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

Namespace

Symfony\Component\Process

Code

public function disableOutput() {
  if ($this
    ->isRunning()) {
    throw new RuntimeException('Disabling output while the process is running is not possible.');
  }
  if (null !== $this->idleTimeout) {
    throw new LogicException('Output can not be disabled while an idle timeout is set.');
  }
  $this->outputDisabled = true;
  return $this;
}