Correct way to deallocate an unix signal source

2019-03-14 Thread Enrico Mioso via gtk-app-devel-list
Hello all, and thank you for your great work in the GLib library, and the entire GTK ecosystem! :) I am facing an issue, where it seems I am not deallocating correctly an UNIX signal source. I use my_state->unix_signals_src = g_unix_signal_source_new(SIGINT);

Re: Correct way to deallocate an unix signal source

2019-03-19 Thread Enrico Mioso via gtk-app-devel-list
Dear Philip, thank you very much for your answer and patience. I will send a patch soon! :) Regarding the code, at exit I do the following: if (my_state->mainloop) { g_main_loop_unref(my_state->mainloop); my_state->mainloop = NULL; } if (my_state->ctx) {

Re: Correct way to deallocate an unix signal source

2019-03-19 Thread Enrico Mioso via gtk-app-devel-list
That's great! Thanks! Yeah, I'll keep it on my mind. I currently choose to depend on GLib 2.58 to do something like: g_source_set_callback(lctx->logwatcher, G_SOURCE_FUNC(agh_ubus_logstream_channel_io), lctx, NULL); so there should be no issues in case. Thank again!! Enrico On Mon, 18 Mar