Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/daemon/PhutilDaemonHandle.php
Show First 20 Lines • Show All 159 Lines • ▼ Show 20 Lines | if ($future->canResolve()) { | ||||
} catch (Throwable $ex) { | } catch (Throwable $ex) { | ||||
$caught = $ex; | $caught = $ex; | ||||
} | } | ||||
} | } | ||||
list($stdout, $stderr) = $future->read(); | list($stdout, $stderr) = $future->read(); | ||||
$future->discardBuffers(); | $future->discardBuffers(); | ||||
if (strlen($stdout)) { | if (phutil_nonempty_string($stdout)) { | ||||
$this->didReadStdout($stdout); | $this->didReadStdout($stdout); | ||||
} | } | ||||
$stderr = trim($stderr); | $stderr = trim($stderr); | ||||
if (strlen($stderr)) { | if (phutil_nonempty_string($stderr)) { | ||||
foreach (phutil_split_lines($stderr, false) as $line) { | foreach (phutil_split_lines($stderr, false) as $line) { | ||||
$this->logMessage('STDE', $line); | $this->logMessage('STDE', $line); | ||||
} | } | ||||
} | } | ||||
if ($result !== null || $caught !== null) { | if ($result !== null || $caught !== null) { | ||||
if ($caught) { | if ($caught) { | ||||
▲ Show 20 Lines • Show All 356 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0