it prints a message and calls foo_mem_clean(), swiftly and safely
bringing the runtime down before letting the calling thread it was
ready to exit. note, this is handled through GLib which guarantees
it is only fired once, rather than unwrapped signals that can occur
wildly.
}
+/* wrapper for glib's unix signal handling; called only once if terminating signal is raised against us */
+gboolean unix_sig_terminate_handler(gpointer data) {
+
+ g_printf("caught SIGINT/HUP/TERM, exiting\n");
+
+ localed_mem_clean();
+ return G_SOURCE_REMOVE;
+}
+
int main() {
localed_loop = g_main_loop_new(NULL, TRUE);
}
+/* wrapper for glib's unix signal handling; called only once if terminating signal is raised against us */
+gboolean unix_sig_terminate_handler(gpointer data) {
+
+ g_printf("caught SIGINT/HUP/TERM, exiting\n");
+
+ logind_mem_clean();
+ return G_SOURCE_REMOVE;
+}
+
int main() {
logind_loop = g_main_loop_new(NULL, TRUE);
}
+/* wrapper for glib's unix signal handling; called only once if terminating signal is raised against us */
+gboolean unix_sig_terminate_handler(gpointer data) {
+
+ g_printf("caught SIGINT/HUP/TERM, exiting\n");
+
+ timedated_mem_clean();
+ return G_SOURCE_REMOVE;
+}
+
int main() {
timedated_loop = g_main_loop_new(NULL, TRUE);