From: Tiago Vignatti Date: Mon, 8 Aug 2011 12:52:59 +0000 (-0700) Subject: compositor: Move signal handler initialization before module loading X-Git-Tag: 0.85.0~388 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2116b891568cc2f86ad375177ad84b286b90d84a;p=profile%2Fivi%2Fweston.git compositor: Move signal handler initialization before module loading Signed-off-by: Tiago Vignatti --- diff --git a/compositor/compositor.c b/compositor/compositor.c index 177de54..680772d 100644 --- a/compositor/compositor.c +++ b/compositor/compositor.c @@ -2054,7 +2054,13 @@ int main(int argc, char *argv[]) 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 (getenv("WAYLAND_DISPLAY")) @@ -2095,14 +2101,6 @@ int main(int argc, char *argv[]) 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); if (xserver)