… | |
… | |
287 | |
287 | |
288 | /* clean up everything before exiting */ |
288 | /* clean up everything before exiting */ |
289 | void |
289 | void |
290 | emergency_save () |
290 | emergency_save () |
291 | { |
291 | { |
292 | LOG (llevDebug, "emergency save begin.\n"); |
292 | LOG (llevInfo, "emergency_save: enter\n"); |
|
|
293 | |
|
|
294 | LOG (llevInfo, "emergency_save: saving book archive\n"); |
|
|
295 | write_book_archive (); |
293 | |
296 | |
294 | cfperl_emergency_save (); |
297 | cfperl_emergency_save (); |
295 | |
298 | |
296 | LOG (llevDebug, "saving book archive.\n"); |
|
|
297 | write_book_archive (); |
|
|
298 | |
|
|
299 | LOG (llevDebug, "emergency save done.\n"); |
299 | LOG (llevInfo, "emergency_save: leave\n"); |
300 | } |
300 | } |
301 | |
301 | |
302 | // send all clients some informational text |
302 | // send all clients some informational text |
303 | static void |
303 | static void |
304 | cleanup_inform (const char *cause, bool make_core) |
304 | cleanup_inform (const char *cause, bool make_core) |
… | |
… | |
323 | cleanup (const char *cause, bool make_core) |
323 | cleanup (const char *cause, bool make_core) |
324 | { |
324 | { |
325 | if (make_core) |
325 | if (make_core) |
326 | fork_abort (cause); |
326 | fork_abort (cause); |
327 | |
327 | |
328 | LOG (llevError, "cleanup cause: %s\n", cause); |
328 | LOG (make_core ? llevError : llevInfo, "cleanup cause: %s\n", cause); |
329 | |
329 | |
330 | if (!make_core) |
330 | if (!make_core) |
331 | cleanup_inform (cause, make_core); |
331 | cleanup_inform (cause, make_core); |
332 | |
332 | |
333 | LOG (llevDebug, "cleanup begin.\n"); |
333 | LOG (llevDebug, "cleanup begin.\n"); |