[geary/mjog/misc-fixes] Warn about bad shutdowns so they can be caught and diagnosed
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/mjog/misc-fixes] Warn about bad shutdowns so they can be caught and diagnosed
- Date: Thu, 5 Dec 2019 01:57:20 +0000 (UTC)
commit 411f3ef661362bd97b4f13ff4b9ce82876c5947b
Author: Michael Gratton <mike vee net>
Date: Wed Dec 4 09:48:47 2019 +0800
Warn about bad shutdowns so they can be caught and diagnosed
src/client/application/application-client.vala | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/client/application/application-client.vala b/src/client/application/application-client.vala
index 8e35ad3a..b9504edd 100644
--- a/src/client/application/application-client.vala
+++ b/src/client/application/application-client.vala
@@ -761,8 +761,12 @@ public class Application.Client : Gtk.Application {
int64 delta_usec = get_monotonic_time() - start_usec;
if (delta_usec >= FORCE_SHUTDOWN_USEC) {
- debug("Forcing shutdown of Geary, %ss passed...",
- (delta_usec / USEC_PER_SEC).to_string());
+ // Use a warning here so a) it's usually logged
+ // and b) we can run under gdb with
+ // G_DEBUG=fatal-warnings and have it break when
+ // this happens, and maybe debug it.
+ warning("Forcing shutdown of Geary, %ss passed...",
+ (delta_usec / USEC_PER_SEC).to_string());
Posix.exit(2);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]