06.19
php
saved
the_undefined
Note
the_undefined did not leave a note
the_undefined did not leave a note
- <?php
- class Process {
- public $cmd;
- protected $_process;
- protected $_pipes;
- protected $_exitCode = false;
- protected $_stdOut = false;
- protected $_stdErr = false;
- public function start($cmd = null) {
- if ($cmd) {
- $this->cmd = $cmd;
- }
- $cmd = '(' . $this->cmd . ') 3>/dev/null ; echo $? >&3';
- ), $this->_pipes);
- }
- public function running() {
- $status = $this->_status();
- return $status['running'];
- }
- public function pid() {
- $status = $this->_status();
- return $status['pid'];
- }
- public function close() {
- $exitCode = -1;
- // Get the stdout and stderr as well
- }
- foreach ($this->_pipes as $pipe) {
- }
- }
- if ($this->running()) {
- }
- return $this->_exitCode = $exitCode;
- }
- protected function _status() {
- $status = proc_get_status($this->_process);
- return $status;
- }
- public function exitCode() {
- return $this->_exitCode;
- }
- }
- ?>
Parsed in 0.077 seconds, using GeSHi 1.0.7.14