Hi all, I'm extending the Console_Process_Unix class per the example
in the documentation and wanted to call the stop() method inside of
the _run() method. I was hoping this would trickle up to the code
where I actually instantiate the class and call $process->start(), but
it doesn't look like it does.

How do you signal to looping code that the child process is done doing
it's thing?

ex.

some script.php

$process = new App_Process_MyProc();
$process->start();


and this class in another file that I've included

class App_Process_MyProc extends ZendX_Console_Process_Unix {
        protected function _run() {
               // run some code here
               $this->stop();
        }
}


Based on the output of print_r($process) from the script and
print_r($this) from inside of App_Process_MyProc, _isRunning stays 1
even after I call $this->stop() inside of the child. The child reports
that isRunning is set to empty though.

So how do you communicate that the child is done? returning from
_run() doesn't appear to do it, exiting from _run() doesnt either.
Should I use setVariable and getVariable to use a value that I check
for? I think I'm just missing something really obvious here.

Using ZF 1.9.3PL1

Thanks in advance,
Tim

Reply via email to