Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ProcessStream.php

function ProcessStream::terminate

Overrides AbstractStream::terminate

File

vendor/symfony/mailer/Transport/Smtp/Stream/ProcessStream.php, line 57

Class

ProcessStream
A stream supporting local processes.

Namespace

Symfony\Component\Mailer\Transport\Smtp\Stream

Code

public function terminate() : void {
    if (null !== $this->stream) {
        fclose($this->in);
        $out = stream_get_contents($this->out);
        fclose($this->out);
        $err = stream_get_contents($this->err);
        fclose($this->err);
        if (0 !== ($exitCode = proc_close($this->stream))) {
            $errorMessage = 'Process failed with exit code ' . $exitCode . ': ' . $out . $err;
        }
    }
    parent::terminate();
    if (!$this->interactive && isset($errorMessage)) {
        throw new TransportException($errorMessage);
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal