Merge branch '3.8'

Conflicts:
	composer.json
	composer.lock
	lib/classes/task/Scheduler.php
This commit is contained in:
Romain Neutron
2013-10-18 15:01:47 +02:00
3 changed files with 11 additions and 4 deletions

View File

@@ -372,7 +372,14 @@ class task_Scheduler
);
if (is_resource($taskPoll[$tkey]["process"])) {
$this->sleep(2);
// let the process lock and write it's pid
$sleepTimeout = microtime(true) + 10;
do {
usleep(500000);
if (null !== $taskPoll[$tkey]['task']->getPID()) {
break;
}
} while (microtime(true) < $sleepTimeout);
}
if (is_resource($taskPoll[$tkey]["process"]) && ($pid = $taskPoll[$tkey]['task']->getPID()) !== null) {