Changeset View
Changeset View
Standalone View
Standalone View
src/future/exec/ExecFuture.php
Show First 20 Lines • Show All 420 Lines • ▼ Show 20 Lines | /* -( Resolving Execution )------------------------------------------------ */ | ||||
* Resolve the process by abruptly terminating it. | * Resolve the process by abruptly terminating it. | ||||
* | * | ||||
* @return list List of <err, stdout, stderr> results. | * @return list List of <err, stdout, stderr> results. | ||||
* @task resolve | * @task resolve | ||||
*/ | */ | ||||
public function resolveKill() { | public function resolveKill() { | ||||
if (!$this->result) { | if (!$this->result) { | ||||
$signal = 9; | $signal = 9; | ||||
if ($this->proc) { | |||||
proc_terminate($this->proc, $signal); | proc_terminate($this->proc, $signal); | ||||
} | |||||
$this->result = array( | $this->result = array( | ||||
128 + $signal, | 128 + $signal, | ||||
$this->stdout, | $this->stdout, | ||||
$this->stderr, | $this->stderr, | ||||
); | ); | ||||
$this->closeProcess(); | $this->closeProcess(); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 525 Lines • Show Last 20 Lines |