function background_process_keepalive in Background Process 6
Same name and namespace in other branches
- 8 background_process.module \background_process_keepalive()
- 7.2 background_process.module \background_process_keepalive()
- 7 background_process.module \background_process_keepalive()
Keep the current background process alive (meaning restart it when it exits)
1 call to background_process_keepalive()
- _background_batch_process in background_batch/
background_batch.module - Process a batch step
1 string reference to 'background_process_keepalive'
- background_process_restart in ./
background_process.module - Restart the current background process
File
- ./
background_process.module, line 621
Code
function background_process_keepalive() {
$args = func_get_args();
$handle = background_process_current_handle();
if (!$handle) {
throw new Exception(t('Background process handle %handle not found', array(
'%handle' => $handle,
)));
}
$process = background_process_get_process($handle);
if (!$process) {
throw new Exception(t('Background process %handle not found', array(
'%handle' => $handle,
)));
}
register_shutdown_function('_background_process_restart', $process, $args);
}