Fix #990 : add check on posix support for pcntl

This commit is contained in:
Romain Neutron
2012-11-05 15:16:33 +01:00
parent b195375614
commit d25bae42a7
3 changed files with 13 additions and 3 deletions

View File

@@ -65,10 +65,9 @@ class task_Scheduler
$nullfile = 'NUL';
}
if (function_exists('pcntl_fork')) {
if (\task_manager::isPosixPcntlSupported()) {
// avoid <defunct> php when a task ends
pcntl_signal(SIGCHLD, SIG_IGN);
$this->method = self::METHOD_FORK;
}