Thank you for your help.
I, indeed, forgot to create a GMainContext and thanks to @dkondor I ran the GMainLoop in another thread which also solved my problem. g_main_loop_run is a blocking function.
Thank you for your help.
I, indeed, forgot to create a GMainContext and thanks to @dkondor I ran the GMainLoop in another thread which also solved my problem. g_main_loop_run is a blocking function.