compositor: Move signal handler initialization before module loading
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
This commit is contained in:
committed by
Kristian Høgsberg
parent
5884bcde4a
commit
2116b89156
@@ -2054,7 +2054,13 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
display = wl_display_create();
|
display = wl_display_create();
|
||||||
|
|
||||||
ec = NULL;
|
loop = wl_display_get_event_loop(display);
|
||||||
|
wl_event_loop_add_signal(loop, SIGTERM, on_term_signal, ec);
|
||||||
|
wl_event_loop_add_signal(loop, SIGINT, on_term_signal, ec);
|
||||||
|
wl_event_loop_add_signal(loop, SIGQUIT, on_term_signal, ec);
|
||||||
|
|
||||||
|
wl_list_init(&child_process_list);
|
||||||
|
wl_event_loop_add_signal(loop, SIGCHLD, sigchld_handler, NULL);
|
||||||
|
|
||||||
if (!backend) {
|
if (!backend) {
|
||||||
if (getenv("WAYLAND_DISPLAY"))
|
if (getenv("WAYLAND_DISPLAY"))
|
||||||
@@ -2095,14 +2101,6 @@ int main(int argc, char *argv[])
|
|||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
loop = wl_display_get_event_loop(ec->wl_display);
|
|
||||||
wl_event_loop_add_signal(loop, SIGTERM, on_term_signal, ec);
|
|
||||||
wl_event_loop_add_signal(loop, SIGINT, on_term_signal, ec);
|
|
||||||
wl_event_loop_add_signal(loop, SIGQUIT, on_term_signal, ec);
|
|
||||||
|
|
||||||
wl_list_init(&child_process_list);
|
|
||||||
wl_event_loop_add_signal(loop, SIGCHLD, sigchld_handler, NULL);
|
|
||||||
|
|
||||||
wl_display_run(display);
|
wl_display_run(display);
|
||||||
|
|
||||||
if (xserver)
|
if (xserver)
|
||||||
|
|||||||
Reference in New Issue
Block a user