You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
syslog(LOG_NOTICE, EXPAND_AND_QUOTE(APPLICATION_NAME) " shutting down due to a SIGTERM or SIGQUIT signal. Regular shutdown\n");
270
+
} else {
271
+
fprintf(stderr, EXPAND_AND_QUOTE(APPLICATION_NAME) " shutting down due to a SIGTERM or SIGQUIT signal. No regular shutdown. Errors to follow are collateral damage errors !!!!!!");
272
+
fflush(stderr);
273
+
}
274
+
275
+
ExitHandler::StartShutdown();
229
276
}
230
277
}
231
278
@@ -285,8 +332,29 @@ namespace PluginHost {
285
332
}
286
333
#endif
287
334
335
+
staticvoidForcedExit() {
336
+
if (_atExitActive == true) {
337
+
if (_background) {
338
+
syslog(LOG_ERR, EXPAND_AND_QUOTE(APPLICATION_NAME) " shutting down due to an atexit request. No regular shutdown. Errors to follow are collateral damage errors !!!!!!");
339
+
} else {
340
+
fprintf(stderr, EXPAND_AND_QUOTE(APPLICATION_NAME) " shutting down due to an atexit request. No regular shutdown. Errors to follow are collateral damage errors !!!!!!");
341
+
fflush(stderr);
342
+
}
343
+
ExitHandler::Destruct();
344
+
}
345
+
}
346
+
288
347
staticvoidUncaughtExceptions () {
348
+
if (_background) {
349
+
syslog(LOG_ERR, EXPAND_AND_QUOTE(APPLICATION_NAME) " shutting down due to an uncaught exception. No regular shutdown. Errors to follow are collateral damage errors !!!!!!");
350
+
} else {
351
+
fprintf(stderr, EXPAND_AND_QUOTE(APPLICATION_NAME) " shutting down due to an uncaught exception. No regular shutdown. Errors to follow are collateral damage errors !!!!!!");
352
+
fflush(stderr);
353
+
}
354
+
289
355
Logging::DumpException(_T("General"));
356
+
357
+
ExitHandler::Destruct();
290
358
}
291
359
292
360
#ifdef __WINDOWS__
@@ -305,7 +373,7 @@ namespace PluginHost {
305
373
306
374
ConsoleOptions options(argc, argv);
307
375
308
-
if (atexit(ExitHandler::Destruct) != 0) {
376
+
if (atexit(ForcedExit) != 0) {
309
377
TRACE_L1("Could not register @exit handler. Argc %d.", argc);
310
378
ExitHandler::Destruct();
311
379
exit(EXIT_FAILURE);
@@ -766,8 +834,14 @@ namespace PluginHost {
766
834
}
767
835
}
768
836
837
+
if (_background == false) {
838
+
fprintf(stderr, EXPAND_AND_QUOTE(APPLICATION_NAME) " shutting down due to a 'Q' press in the terminal. Regular shutdown\n");
0 commit comments