fix issue 895 (scheduler creates zombies)

fix bug in windows : tasks did not start
cleanup
This commit is contained in:
jygaulier
2012-09-26 15:27:14 +02:00
committed by Romain Neutron
parent eb73d9b907
commit bfc1ddcb5f
4 changed files with 13 additions and 8 deletions

View File

@@ -143,7 +143,7 @@ class module_console_taskrun extends Command
if (time() - $start > 0) {
if ($this->shedulerPID) {
if ( ! posix_kill($this->shedulerPID, 0)) {
if (function_exists('posix_kill') && !posix_kill($this->shedulerPID, 0)) {
if (method_exists($this->task, 'signal')) {
$this->task->signal('SIGNAL_SCHEDULER_DIED');
} else {