function hosting_queued_stop in Hosting 6.2
Same name and namespace in other branches
- 7.4 queued/hosting_queued.drush.inc \hosting_queued_stop()
- 7.3 queued/hosting_queued.drush.inc \hosting_queued_stop()
Handle interruption signals gracefully
We do not want to interrupt children tasks, so we wait for them before stopping.
1 string reference to 'hosting_queued_stop'
- drush_hosting_queued in queued/
hosting_queued.drush.inc - Drush command to execute hosting tasks.
File
- queued/
hosting_queued.drush.inc, line 144 - Dispatcher daemon
Code
function hosting_queued_stop($signal) {
watchdog('hosting_queued', 'Received signal @signal, waiting for children to die.', array(
'@signal' => $signal,
));
$status = NULL;
pcntl_wait($status);
watchdog('hosting_queued', 'Stopped daemon');
exit($status);
}