Icicle\Concurrent\Process\Process::__destruct PHP Method

__destruct() public method

Stops the process if it is still running.
public __destruct ( )
    public function __destruct()
    {
        if (getmypid() === $this->oid) {
            $this->kill();
            // Will only terminate if the process is still running.
            if (null !== $this->stdin) {
                $this->stdin->close();
            }
            if (null !== $this->stdout) {
                $this->stdout->close();
            }
            if (null !== $this->stderr) {
                $this->stderr->close();
            }
        }
    }