e_main: removed unnecessary handler for x fatal error. 14/136714/2
authorGwanglim Lee <gl77.lee@samsung.com>
Mon, 3 Jul 2017 04:28:51 +0000 (13:28 +0900)
committerDoyoun Kang <doyoun.kang@samsung.com>
Mon, 3 Jul 2017 04:32:21 +0000 (04:32 +0000)
Change-Id: I91ce87d456a8d9cb5ea3ea5990c38065478f74c9

src/bin/e.h
src/bin/e_main.c
src/bin/e_module.c

index 1f423bb..e63d874 100644 (file)
@@ -334,7 +334,6 @@ extern E_API Eina_Bool restart;
 extern E_API Eina_Bool e_nopause;
 
 extern E_API Eina_Bool e_precache_end;
-extern E_API Eina_Bool x_fatal;
 
 extern EINTERN const char *e_first_frame;
 extern EINTERN double e_first_frame_start_time;
index 2d2542e..716829e 100644 (file)
@@ -90,7 +90,6 @@ static void      _e_main_hook_call(E_Main_Hook_Point hookpoint, void *data EINA_
 /* local variables */
 static Eina_Bool really_know = EINA_FALSE;
 static Eina_Bool inloop = EINA_FALSE;
-static jmp_buf x_fatal_buff;
 
 static int _e_main_lvl = 0;
 static int(*_e_main_shutdown_func[MAX_LEVEL]) (void);
@@ -113,7 +112,6 @@ static Eina_Inlist *_e_main_hooks[] =
 
 /* external variables */
 E_API Eina_Bool e_precache_end = EINA_FALSE;
-E_API Eina_Bool x_fatal = EINA_FALSE;
 E_API Eina_Bool good = EINA_FALSE;
 E_API Eina_Bool evil = EINA_FALSE;
 E_API Eina_Bool starting = EINA_TRUE;
@@ -720,10 +718,8 @@ main(int argc, char **argv)
      _e_main_create_wm_ready();
 
    TRACE_DS_END();
-   if (!setjmp(x_fatal_buff))
-     ecore_main_loop_begin();
-   else
-     CRI("FATAL: X Died. Connection gone. Abbreviated Shutdown\n");
+
+   ecore_main_loop_begin();
 
    inloop = EINA_FALSE;
    stopping = EINA_TRUE;
@@ -880,18 +876,6 @@ _e_main_parse_arguments(int argc, char **argv)
      }
 }
 
-EINTERN void
-_e_main_cb_x_fatal(void *data EINA_UNUSED)
-{
-   e_error_message_show("Lost X Connection.\n");
-   ecore_main_loop_quit();
-   if (!x_fatal)
-     {
-        x_fatal = EINA_TRUE;
-        if (inloop) longjmp(x_fatal_buff, -99);
-     }
-}
-
 static Eina_Bool
 _e_main_cb_signal_exit(void *data EINA_UNUSED, int ev_type EINA_UNUSED, void *ev EINA_UNUSED)
 {
index 672a142..19702d0 100644 (file)
@@ -195,23 +195,18 @@ e_module_shutdown(void)
 #endif
 
    /* do not use EINA_LIST_FREE! e_object_del modifies list */
-   if (x_fatal)
-     e_module_save_all();
-   else
+   while (_e_modules)
      {
-        while (_e_modules)
+        m = _e_modules->data;
+        if ((m) && (m->enabled) && !(m->error))
           {
-             m = _e_modules->data;
-             if ((m) && (m->enabled) && !(m->error))
-               {
-                  // if (m->func.save) m->func.save(m); dont' save config, there is a possibility
-                  // that the file save operation at the time of system shutdown
-                  // may break when filesystem unmount.
-                  if (m->func.shutdown) m->func.shutdown(m);
-                  m->enabled = 0;
-               }
-             e_object_del(E_OBJECT(m));
+             // if (m->func.save) m->func.save(m); dont' save config, there is a possibility
+             // that the file save operation at the time of system shutdown
+             // may break when filesystem unmount.
+             if (m->func.shutdown) m->func.shutdown(m);
+             m->enabled = 0;
           }
+        e_object_del(E_OBJECT(m));
      }
 
    E_FREE_FUNC(_e_module_path_hash, eina_hash_free);