protected function exec()
{
$descriptorSpec = array(
0 => array('pipe', 'r'),
1 => array('pipe', 'w'),
2 => array('pipe', 'a')
);
Response::addRecord('Command: ' . $this->getCommand());
$process = proc_open($this->getCommand(), $descriptorSpec, $pipes, $this->directory);
if (is_resource($process)) {
Response::addRecord('Response: ' . stream_get_contents($pipes[1]));
fclose($pipes[1]);
return proc_close($process);
}
return false;
}