summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
712eb32)
this function calls attached the ones from the previous commit to the
GLib runtime properly. since we are working solely in the default context
(in terms on the GMainLoop) we are guaranteed the attached functions will
only run once.
return G_SOURCE_REMOVE;
}
return G_SOURCE_REMOVE;
}
+void set_signal_handlers() {
+
+ /* we don't care about its descriptor, we never need to unregister these */
+ g_unix_signal_add(SIGINT, unix_sig_terminate_handler, NULL);
+ g_unix_signal_add(SIGHUP, unix_sig_terminate_handler, NULL);
+ g_unix_signal_add(SIGTERM, unix_sig_terminate_handler, NULL);
+}
+
int main() {
localed_loop = g_main_loop_new(NULL, TRUE);
int main() {
localed_loop = g_main_loop_new(NULL, TRUE);
return G_SOURCE_REMOVE;
}
return G_SOURCE_REMOVE;
}
+void set_signal_handlers() {
+
+ /* we don't care about its descriptor, we never need to unregister these */
+ g_unix_signal_add(SIGINT, unix_sig_terminate_handler, NULL);
+ g_unix_signal_add(SIGHUP, unix_sig_terminate_handler, NULL);
+ g_unix_signal_add(SIGTERM, unix_sig_terminate_handler, NULL);
+}
+
int main() {
logind_loop = g_main_loop_new(NULL, TRUE);
int main() {
logind_loop = g_main_loop_new(NULL, TRUE);
return G_SOURCE_REMOVE;
}
return G_SOURCE_REMOVE;
}
+void set_signal_handlers() {
+
+ /* we don't care about its descriptor, we never need to unregister these */
+ g_unix_signal_add(SIGINT, unix_sig_terminate_handler, NULL);
+ g_unix_signal_add(SIGHUP, unix_sig_terminate_handler, NULL);
+ g_unix_signal_add(SIGTERM, unix_sig_terminate_handler, NULL);
+}
+
int main() {
timedated_loop = g_main_loop_new(NULL, TRUE);
int main() {
timedated_loop = g_main_loop_new(NULL, TRUE);