/** * This function is used to process SIGCHLD signal. * */ function sigchld_handler($signal) { $running_jobs = reap_children(); // echo "[SIGCHLD] jobs left: $running_jobs\n"; pcntl_waitpid(-1, $status, WNOHANG); }
function sigchld_handler($signal) { $running_jobs = reap_children(); _debug("[SIGCHLD] jobs left: {$running_jobs}"); pcntl_waitpid(-1, $status, WNOHANG); }