exit codes - clean up and handle consistently

also x io error - exit as we must.
This commit is contained in:
Carsten Haitzler 2020-07-20 14:21:20 +01:00
parent caaff77b42
commit 59dba6192a
5 changed files with 76 additions and 75 deletions

View File

@ -31,7 +31,7 @@ _e_comp_canvas_cb_first_frame(void *data EINA_UNUSED, Evas *e, void *event_info
{ {
case 'A': abort(); case 'A': abort();
case 'E': case 'E':
case 'D': exit(-1); case 'D': exit(101);
case 'T': fprintf(stderr, "Startup time: '%f' - '%f' = '%f'\n", now, e_first_frame_start_time, now - e_first_frame_start_time); case 'T': fprintf(stderr, "Startup time: '%f' - '%f' = '%f'\n", now, e_first_frame_start_time, now - e_first_frame_start_time);
break; break;
} }

View File

@ -185,7 +185,7 @@ e_hints_init(Ecore_Window root, Ecore_Window propwin)
{ {
e_error_message_show(_("A previous instance of Enlightenment is still active\n" e_error_message_show(_("A previous instance of Enlightenment is still active\n"
"on this screen. Aborting startup.\n")); "on this screen. Aborting startup.\n"));
exit(1); exit(101);
} }
/* get/check agan */ /* get/check agan */
nwins = ecore_x_window_prop_window_get(root, nwins = ecore_x_window_prop_window_get(root,

View File

@ -191,7 +191,7 @@ _e_ipc_cb_client_data(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
break; break;
case E_ALERT_OP_EXIT: case E_ALERT_OP_EXIT:
exit(-11); exit(101);
break; break;
} }
} }

View File

@ -295,7 +295,7 @@ main(int argc, char **argv)
if (!eina_init()) if (!eina_init())
{ {
e_error_message_show(_("Enlightenment cannot initialize Eina!\n")); e_error_message_show(_("Enlightenment cannot initialize Eina!\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
eina_file_statgen_enable(); eina_file_statgen_enable();
@ -304,7 +304,7 @@ main(int argc, char **argv)
if (!e_log_init()) if (!e_log_init())
{ {
e_error_message_show(_("Enlightenment could not create a logging domain!\n")); e_error_message_show(_("Enlightenment could not create a logging domain!\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
#ifdef TS_DO #ifdef TS_DO
#undef TS #undef TS
@ -367,7 +367,7 @@ main(int argc, char **argv)
if (!eet_init()) if (!eet_init())
{ {
e_error_message_show(_("Enlightenment cannot initialize Eet!\n")); e_error_message_show(_("Enlightenment cannot initialize Eet!\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("Eet Init Done"); TS("Eet Init Done");
_e_main_shutdown_push(eet_shutdown); _e_main_shutdown_push(eet_shutdown);
@ -376,7 +376,7 @@ main(int argc, char **argv)
if (!ecore_init()) if (!ecore_init())
{ {
e_error_message_show(_("Enlightenment cannot initialize Ecore!\n")); e_error_message_show(_("Enlightenment cannot initialize Ecore!\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("Ecore Init Done"); TS("Ecore Init Done");
_e_main_shutdown_push(ecore_shutdown); _e_main_shutdown_push(ecore_shutdown);
@ -395,7 +395,7 @@ main(int argc, char **argv)
if (!e_efx_init()) if (!e_efx_init())
{ {
e_error_message_show(_("Enlightenment cannot initialize EFX!\n")); e_error_message_show(_("Enlightenment cannot initialize EFX!\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("EFX Init Done"); TS("EFX Init Done");
_e_main_shutdown_push((void*)e_efx_shutdown); _e_main_shutdown_push((void*)e_efx_shutdown);
@ -404,7 +404,7 @@ main(int argc, char **argv)
if (!eio_init()) if (!eio_init())
{ {
e_error_message_show(_("Enlightenment cannot initialize EIO!\n")); e_error_message_show(_("Enlightenment cannot initialize EIO!\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("EIO Init Done"); TS("EIO Init Done");
_e_main_shutdown_push(eio_shutdown); _e_main_shutdown_push(eio_shutdown);
@ -417,21 +417,21 @@ main(int argc, char **argv)
{ {
e_error_message_show(_("Enlightenment cannot set up an exit signal handler.\n" e_error_message_show(_("Enlightenment cannot set up an exit signal handler.\n"
"Perhaps you are out of memory?")); "Perhaps you are out of memory?"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
if (!ecore_event_handler_add(ECORE_EVENT_SIGNAL_HUP, if (!ecore_event_handler_add(ECORE_EVENT_SIGNAL_HUP,
_e_main_cb_signal_hup, NULL)) _e_main_cb_signal_hup, NULL))
{ {
e_error_message_show(_("Enlightenment cannot set up a HUP signal handler.\n" e_error_message_show(_("Enlightenment cannot set up a HUP signal handler.\n"
"Perhaps you are out of memory?")); "Perhaps you are out of memory?"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
if (!ecore_event_handler_add(ECORE_EVENT_SIGNAL_USER, if (!ecore_event_handler_add(ECORE_EVENT_SIGNAL_USER,
_e_main_cb_signal_user, NULL)) _e_main_cb_signal_user, NULL))
{ {
e_error_message_show(_("Enlightenment cannot set up a USER signal handler.\n" e_error_message_show(_("Enlightenment cannot set up a USER signal handler.\n"
"Perhaps you are out of memory?")); "Perhaps you are out of memory?"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("Ecore Event Handlers Done"); TS("Ecore Event Handlers Done");
@ -439,7 +439,7 @@ main(int argc, char **argv)
if (!ecore_file_init()) if (!ecore_file_init())
{ {
e_error_message_show(_("Enlightenment cannot initialize Ecore_File!\n")); e_error_message_show(_("Enlightenment cannot initialize Ecore_File!\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("Ecore_File Init Done"); TS("Ecore_File Init Done");
_e_main_shutdown_push(ecore_file_shutdown); _e_main_shutdown_push(ecore_file_shutdown);
@ -448,7 +448,7 @@ main(int argc, char **argv)
if (!ecore_con_init()) if (!ecore_con_init())
{ {
e_error_message_show(_("Enlightenment cannot initialize Ecore_Con!\n")); e_error_message_show(_("Enlightenment cannot initialize Ecore_Con!\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("Ecore_Con Init Done"); TS("Ecore_Con Init Done");
_e_main_shutdown_push(ecore_con_shutdown); _e_main_shutdown_push(ecore_con_shutdown);
@ -457,7 +457,7 @@ main(int argc, char **argv)
if (!ecore_ipc_init()) if (!ecore_ipc_init())
{ {
e_error_message_show(_("Enlightenment cannot initialize Ecore_Ipc!\n")); e_error_message_show(_("Enlightenment cannot initialize Ecore_Ipc!\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("Ecore_Ipc Init Done"); TS("Ecore_Ipc Init Done");
_e_main_shutdown_push(ecore_ipc_shutdown); _e_main_shutdown_push(ecore_ipc_shutdown);
@ -468,7 +468,7 @@ main(int argc, char **argv)
if (!ecore_evas_init()) if (!ecore_evas_init())
{ {
e_error_message_show(_("Enlightenment cannot initialize Ecore_Evas!\n")); e_error_message_show(_("Enlightenment cannot initialize Ecore_Evas!\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("Ecore_Evas Init Done"); TS("Ecore_Evas Init Done");
// _e_main_shutdown_push(ecore_evas_shutdown); // _e_main_shutdown_push(ecore_evas_shutdown);
@ -477,7 +477,7 @@ main(int argc, char **argv)
if (!elm_init(argc, argv)) if (!elm_init(argc, argv))
{ {
e_error_message_show(_("Enlightenment cannot initialize Elementary!\n")); e_error_message_show(_("Enlightenment cannot initialize Elementary!\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("Elementary Init Done"); TS("Elementary Init Done");
//_e_main_shutdown_push(elm_shutdown); //_e_main_shutdown_push(elm_shutdown);
@ -486,7 +486,7 @@ main(int argc, char **argv)
if (!emotion_init()) if (!emotion_init())
{ {
e_error_message_show(_("Enlightenment cannot initialize Emotion!\n")); e_error_message_show(_("Enlightenment cannot initialize Emotion!\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("Emotion Init Done"); TS("Emotion Init Done");
/* triggers event flush: do not call */ /* triggers event flush: do not call */
@ -502,7 +502,7 @@ main(int argc, char **argv)
e_error_message_show(_("Enlightenment found ecore_evas doesn't support the Wayland SHM\n" e_error_message_show(_("Enlightenment found ecore_evas doesn't support the Wayland SHM\n"
"rendering in Evas. Please check your installation of Evas and\n" "rendering in Evas. Please check your installation of Evas and\n"
"Ecore and check they support the Wayland SHM rendering engine.")); "Ecore and check they support the Wayland SHM rendering engine."));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
#else #else
if (!ecore_evas_engine_type_supported_get(ECORE_EVAS_ENGINE_SOFTWARE_XCB)) if (!ecore_evas_engine_type_supported_get(ECORE_EVAS_ENGINE_SOFTWARE_XCB))
@ -512,7 +512,7 @@ main(int argc, char **argv)
e_error_message_show(_("Enlightenment found ecore_evas doesn't support the Software X11\n" e_error_message_show(_("Enlightenment found ecore_evas doesn't support the Software X11\n"
"rendering in Evas. Please check your installation of Evas and\n" "rendering in Evas. Please check your installation of Evas and\n"
"Ecore and check they support the Software X11 rendering engine.")); "Ecore and check they support the Software X11 rendering engine."));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
} }
#endif #endif
@ -521,7 +521,7 @@ main(int argc, char **argv)
e_error_message_show(_("Enlightenment found ecore_evas doesn't support the Software Buffer\n" e_error_message_show(_("Enlightenment found ecore_evas doesn't support the Software Buffer\n"
"rendering in Evas. Please check your installation of Evas and\n" "rendering in Evas. Please check your installation of Evas and\n"
"Ecore and check they support the Software Buffer rendering engine.")); "Ecore and check they support the Software Buffer rendering engine."));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("Ecore_Evas Engine Check Done"); TS("Ecore_Evas Engine Check Done");
@ -533,7 +533,7 @@ main(int argc, char **argv)
if (!e_intl_init()) if (!e_intl_init())
{ {
e_error_message_show(_("Enlightenment cannot initialize E_Intl!\n")); e_error_message_show(_("Enlightenment cannot initialize E_Intl!\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("E Intl Init Done"); TS("E Intl Init Done");
_e_main_shutdown_push(e_intl_shutdown); _e_main_shutdown_push(e_intl_shutdown);
@ -545,7 +545,7 @@ main(int argc, char **argv)
{ {
e_error_message_show(_("Enlightenment cannot initialize its emergency alert system.\n" e_error_message_show(_("Enlightenment cannot initialize its emergency alert system.\n"
"Have you set your DISPLAY variable?")); "Have you set your DISPLAY variable?"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("E_Alert Init Done"); TS("E_Alert Init Done");
_e_main_shutdown_push(e_alert_shutdown); _e_main_shutdown_push(e_alert_shutdown);
@ -557,7 +557,7 @@ main(int argc, char **argv)
{ {
e_error_message_show(_("Enlightenment cannot create directories in your home directory.\n" e_error_message_show(_("Enlightenment cannot create directories in your home directory.\n"
"Perhaps you have no home directory or the disk is full?")); "Perhaps you have no home directory or the disk is full?"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("E Directories Init Done"); TS("E Directories Init Done");
_e_main_shutdown_push(_e_main_dirs_shutdown); _e_main_shutdown_push(_e_main_dirs_shutdown);
@ -566,7 +566,7 @@ main(int argc, char **argv)
if (!e_filereg_init()) if (!e_filereg_init())
{ {
e_error_message_show(_("Enlightenment cannot set up its file registry system.\n")); e_error_message_show(_("Enlightenment cannot set up its file registry system.\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("E_Filereg Init Done"); TS("E_Filereg Init Done");
_e_main_shutdown_push(e_filereg_shutdown); _e_main_shutdown_push(e_filereg_shutdown);
@ -575,7 +575,7 @@ main(int argc, char **argv)
if (!e_config_init()) if (!e_config_init())
{ {
e_error_message_show(_("Enlightenment cannot set up its config system.\n")); e_error_message_show(_("Enlightenment cannot set up its config system.\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("E_Config Init Done"); TS("E_Config Init Done");
_e_main_shutdown_push(e_config_shutdown); _e_main_shutdown_push(e_config_shutdown);
@ -604,7 +604,7 @@ main(int argc, char **argv)
if (!e_env_init()) if (!e_env_init())
{ {
e_error_message_show(_("Enlightenment cannot set up its environment.\n")); e_error_message_show(_("Enlightenment cannot set up its environment.\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("E_Env Init Done"); TS("E_Env Init Done");
_e_main_shutdown_push(e_env_shutdown); _e_main_shutdown_push(e_env_shutdown);
@ -623,7 +623,7 @@ main(int argc, char **argv)
{ {
e_error_message_show(_("Enlightenment cannot set up paths for finding files.\n" e_error_message_show(_("Enlightenment cannot set up paths for finding files.\n"
"Perhaps you are out of memory?")); "Perhaps you are out of memory?"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("E Paths Init Done"); TS("E Paths Init Done");
_e_main_shutdown_push(_e_main_path_shutdown); _e_main_shutdown_push(_e_main_path_shutdown);
@ -675,7 +675,7 @@ main(int argc, char **argv)
TS("E_Precache Done"); TS("E_Precache Done");
TS("E_Ipc Init"); TS("E_Ipc Init");
if (!e_ipc_init()) _e_main_shutdown(-1); if (!e_ipc_init()) _e_main_shutdown(101);
TS("E_Ipc Init Done"); TS("E_Ipc Init Done");
_e_main_shutdown_push(e_ipc_shutdown); _e_main_shutdown_push(e_ipc_shutdown);
@ -683,7 +683,7 @@ main(int argc, char **argv)
if (!e_font_init()) if (!e_font_init())
{ {
e_error_message_show(_("Enlightenment cannot set up its font system.\n")); e_error_message_show(_("Enlightenment cannot set up its font system.\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("E_Font Init Done"); TS("E_Font Init Done");
_e_main_shutdown_push(e_font_shutdown); _e_main_shutdown_push(e_font_shutdown);
@ -696,7 +696,7 @@ main(int argc, char **argv)
if (!e_theme_init()) if (!e_theme_init())
{ {
e_error_message_show(_("Enlightenment cannot set up its theme system.\n")); e_error_message_show(_("Enlightenment cannot set up its theme system.\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("E_Theme Init Done"); TS("E_Theme Init Done");
_e_main_shutdown_push(e_theme_shutdown); _e_main_shutdown_push(e_theme_shutdown);
@ -714,7 +714,7 @@ main(int argc, char **argv)
e_error_message_show(_("Enlightenment cannot create a dbus session connection.\n" e_error_message_show(_("Enlightenment cannot create a dbus session connection.\n"
"At best this will break many things, at worst it will hard lock your machine.\n" "At best this will break many things, at worst it will hard lock your machine.\n"
"If you're sure you know what you're doing, export E_NO_DBUS_SESSION=1")); "If you're sure you know what you're doing, export E_NO_DBUS_SESSION=1"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
} }
else else
@ -727,7 +727,7 @@ main(int argc, char **argv)
e_error_message_show(_("Enlightenment cannot initialize the FDO desktop system.\n" e_error_message_show(_("Enlightenment cannot initialize the FDO desktop system.\n"
"Perhaps you lack permissions on ~/.cache/efreet or are\n" "Perhaps you lack permissions on ~/.cache/efreet or are\n"
"out of memory or disk space?")); "out of memory or disk space?"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("Efreet Init Done"); TS("Efreet Init Done");
_e_main_shutdown_push(efreet_shutdown); _e_main_shutdown_push(efreet_shutdown);
@ -736,7 +736,7 @@ main(int argc, char **argv)
if (!e_intl_post_init()) if (!e_intl_post_init())
{ {
e_error_message_show(_("Enlightenment cannot set up its intl system.\n")); e_error_message_show(_("Enlightenment cannot set up its intl system.\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("E_Intl Post Init Done"); TS("E_Intl Post Init Done");
_e_main_shutdown_push(e_intl_post_shutdown); _e_main_shutdown_push(e_intl_post_shutdown);
@ -751,7 +751,7 @@ main(int argc, char **argv)
if (!e_actions_init()) if (!e_actions_init())
{ {
e_error_message_show(_("Enlightenment cannot set up its actions system.\n")); e_error_message_show(_("Enlightenment cannot set up its actions system.\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("E_Actions Init Done"); TS("E_Actions Init Done");
_e_main_shutdown_push(e_actions_shutdown); _e_main_shutdown_push(e_actions_shutdown);
@ -767,7 +767,7 @@ main(int argc, char **argv)
if (!e_system_init()) if (!e_system_init())
{ {
e_error_message_show(_("Enlightenment cannot initialize the Privilege System access system.\n")); e_error_message_show(_("Enlightenment cannot initialize the Privilege System access system.\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("E_System Init Done"); TS("E_System Init Done");
_e_main_shutdown_push(e_system_shutdown); _e_main_shutdown_push(e_system_shutdown);
@ -776,7 +776,7 @@ main(int argc, char **argv)
if (!e_powersave_init()) if (!e_powersave_init())
{ {
e_error_message_show(_("Enlightenment cannot set up its powersave modes.\n")); e_error_message_show(_("Enlightenment cannot set up its powersave modes.\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("E_Powersave Init Done"); TS("E_Powersave Init Done");
_e_main_shutdown_push(e_powersave_shutdown); _e_main_shutdown_push(e_powersave_shutdown);
@ -786,7 +786,7 @@ main(int argc, char **argv)
{ {
e_error_message_show(_("Enlightenment set up window management for all the screens on your system\n" e_error_message_show(_("Enlightenment set up window management for all the screens on your system\n"
"failed. Perhaps another window manager is running?\n")); "failed. Perhaps another window manager is running?\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("Screens Init Done"); TS("Screens Init Done");
_e_main_shutdown_push(_e_main_screens_shutdown); _e_main_shutdown_push(_e_main_screens_shutdown);
@ -795,7 +795,7 @@ main(int argc, char **argv)
if (!e_pointer_init()) if (!e_pointer_init())
{ {
e_error_message_show(_("Enlightenment cannot set up its pointer system.\n")); e_error_message_show(_("Enlightenment cannot set up its pointer system.\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("E_Pointer Init Done"); TS("E_Pointer Init Done");
_e_main_shutdown_push(e_pointer_shutdown); _e_main_shutdown_push(e_pointer_shutdown);
@ -805,7 +805,7 @@ main(int argc, char **argv)
if (!e_scale_init()) if (!e_scale_init())
{ {
e_error_message_show(_("Enlightenment cannot set up its scale system.\n")); e_error_message_show(_("Enlightenment cannot set up its scale system.\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("E_Scale Init Done"); TS("E_Scale Init Done");
_e_main_shutdown_push(e_scale_shutdown); _e_main_shutdown_push(e_scale_shutdown);
@ -816,7 +816,7 @@ main(int argc, char **argv)
if (!e_init_init()) if (!e_init_init())
{ {
e_error_message_show(_("Enlightenment cannot set up its init screen.\n")); e_error_message_show(_("Enlightenment cannot set up its init screen.\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("E_Splash Init Done"); TS("E_Splash Init Done");
_e_main_shutdown_push(e_init_shutdown); _e_main_shutdown_push(e_init_shutdown);
@ -847,7 +847,7 @@ main(int argc, char **argv)
if (!e_backlight_init()) if (!e_backlight_init())
{ {
e_error_message_show(_("Enlightenment cannot configure the backlight.\n")); e_error_message_show(_("Enlightenment cannot configure the backlight.\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("E_Backlight Init Done"); TS("E_Backlight Init Done");
@ -855,7 +855,7 @@ main(int argc, char **argv)
if (!e_dpms_init()) if (!e_dpms_init())
{ {
e_error_message_show(_("Enlightenment cannot configure the DPMS settings.\n")); e_error_message_show(_("Enlightenment cannot configure the DPMS settings.\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("E_Dpms Init Done"); TS("E_Dpms Init Done");
_e_main_shutdown_push(e_dpms_shutdown); _e_main_shutdown_push(e_dpms_shutdown);
@ -864,7 +864,7 @@ main(int argc, char **argv)
if (!e_desklock_init()) if (!e_desklock_init())
{ {
e_error_message_show(_("Enlightenment cannot set up its desk locking system.\n")); e_error_message_show(_("Enlightenment cannot set up its desk locking system.\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("E_Desklock Init Done"); TS("E_Desklock Init Done");
_e_main_shutdown_push(e_desklock_shutdown); _e_main_shutdown_push(e_desklock_shutdown);
@ -883,7 +883,7 @@ main(int argc, char **argv)
if (!e_sys_init()) if (!e_sys_init())
{ {
e_error_message_show(_("Enlightenment cannot initialize the System Command system.\n")); e_error_message_show(_("Enlightenment cannot initialize the System Command system.\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("E_Sys Init Done"); TS("E_Sys Init Done");
_e_main_shutdown_push(e_sys_shutdown); _e_main_shutdown_push(e_sys_shutdown);
@ -892,7 +892,7 @@ main(int argc, char **argv)
if (!e_exec_init()) if (!e_exec_init())
{ {
e_error_message_show(_("Enlightenment cannot set up its exec system.\n")); e_error_message_show(_("Enlightenment cannot set up its exec system.\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("E_Exec Init Done"); TS("E_Exec Init Done");
@ -904,7 +904,7 @@ main(int argc, char **argv)
if (!e_fm2_init()) if (!e_fm2_init())
{ {
e_error_message_show(_("Enlightenment cannot initialize the File manager.\n")); e_error_message_show(_("Enlightenment cannot initialize the File manager.\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("E_Fm2 Init Done"); TS("E_Fm2 Init Done");
_e_main_shutdown_push(e_fm2_shutdown); _e_main_shutdown_push(e_fm2_shutdown);
@ -913,7 +913,7 @@ main(int argc, char **argv)
if (!e_msg_init()) if (!e_msg_init())
{ {
e_error_message_show(_("Enlightenment cannot set up its msg system.\n")); e_error_message_show(_("Enlightenment cannot set up its msg system.\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("E_Msg Init Done"); TS("E_Msg Init Done");
_e_main_shutdown_push(e_msg_shutdown); _e_main_shutdown_push(e_msg_shutdown);
@ -922,7 +922,7 @@ main(int argc, char **argv)
if (!e_grabinput_init()) if (!e_grabinput_init())
{ {
e_error_message_show(_("Enlightenment cannot set up its grab input handling system.\n")); e_error_message_show(_("Enlightenment cannot set up its grab input handling system.\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("E_Grabinput Init Done"); TS("E_Grabinput Init Done");
_e_main_shutdown_push(e_grabinput_shutdown); _e_main_shutdown_push(e_grabinput_shutdown);
@ -931,7 +931,7 @@ main(int argc, char **argv)
if (!e_module_init()) if (!e_module_init())
{ {
e_error_message_show(_("Enlightenment cannot set up its module system.\n")); e_error_message_show(_("Enlightenment cannot set up its module system.\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("E_Module Init Done"); TS("E_Module Init Done");
_e_main_shutdown_push(e_module_shutdown); _e_main_shutdown_push(e_module_shutdown);
@ -940,7 +940,7 @@ main(int argc, char **argv)
if (!e_remember_init(after_restart ? E_STARTUP_RESTART : E_STARTUP_START)) if (!e_remember_init(after_restart ? E_STARTUP_RESTART : E_STARTUP_START))
{ {
e_error_message_show(_("Enlightenment cannot setup remember settings.\n")); e_error_message_show(_("Enlightenment cannot setup remember settings.\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("E_Remember Init Done"); TS("E_Remember Init Done");
_e_main_shutdown_push(e_remember_shutdown); _e_main_shutdown_push(e_remember_shutdown);
@ -954,7 +954,7 @@ main(int argc, char **argv)
if (!e_gadcon_init()) if (!e_gadcon_init())
{ {
e_error_message_show(_("Enlightenment cannot set up its gadget control system.\n")); e_error_message_show(_("Enlightenment cannot set up its gadget control system.\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("E_Gadcon Init Done"); TS("E_Gadcon Init Done");
_e_main_shutdown_push(e_gadcon_shutdown); _e_main_shutdown_push(e_gadcon_shutdown);
@ -963,7 +963,7 @@ main(int argc, char **argv)
if (!e_toolbar_init()) if (!e_toolbar_init())
{ {
e_error_message_show(_("Enlightenment cannot set up its toolbars.\n")); e_error_message_show(_("Enlightenment cannot set up its toolbars.\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("E_Toolbar Init Done"); TS("E_Toolbar Init Done");
_e_main_shutdown_push(e_toolbar_shutdown); _e_main_shutdown_push(e_toolbar_shutdown);
@ -972,7 +972,7 @@ main(int argc, char **argv)
if (!e_bg_init()) if (!e_bg_init())
{ {
e_error_message_show(_("Enlightenment cannot set up its desktop background system.\n")); e_error_message_show(_("Enlightenment cannot set up its desktop background system.\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("E_Bg Init Done"); TS("E_Bg Init Done");
_e_main_shutdown_push(e_bg_shutdown); _e_main_shutdown_push(e_bg_shutdown);
@ -981,7 +981,7 @@ main(int argc, char **argv)
if (!e_mouse_update()) if (!e_mouse_update())
{ {
e_error_message_show(_("Enlightenment cannot configure the mouse settings.\n")); e_error_message_show(_("Enlightenment cannot configure the mouse settings.\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("E_Mouse Init Done"); TS("E_Mouse Init Done");
@ -989,7 +989,7 @@ main(int argc, char **argv)
if (!e_bindings_init()) if (!e_bindings_init())
{ {
e_error_message_show(_("Enlightenment cannot set up its bindings system.\n")); e_error_message_show(_("Enlightenment cannot set up its bindings system.\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("E_Bindings Init Done"); TS("E_Bindings Init Done");
_e_main_shutdown_push(e_bindings_shutdown); _e_main_shutdown_push(e_bindings_shutdown);
@ -998,7 +998,7 @@ main(int argc, char **argv)
if (!e_thumb_init()) if (!e_thumb_init())
{ {
e_error_message_show(_("Enlightenment cannot initialize the Thumbnailing system.\n")); e_error_message_show(_("Enlightenment cannot initialize the Thumbnailing system.\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("E_Thumb Init Done"); TS("E_Thumb Init Done");
_e_main_shutdown_push(e_thumb_shutdown); _e_main_shutdown_push(e_thumb_shutdown);
@ -1007,7 +1007,7 @@ main(int argc, char **argv)
if (!e_icon_init()) if (!e_icon_init())
{ {
e_error_message_show(_("Enlightenment cannot initialize the Icon Cache system.\n")); e_error_message_show(_("Enlightenment cannot initialize the Icon Cache system.\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("E_Icon Init Done"); TS("E_Icon Init Done");
_e_main_shutdown_push(e_icon_shutdown); _e_main_shutdown_push(e_icon_shutdown);
@ -1016,7 +1016,7 @@ main(int argc, char **argv)
if (!e_update_init()) if (!e_update_init())
{ {
e_error_message_show(_("Enlightenment cannot initialize the Update system.\n")); e_error_message_show(_("Enlightenment cannot initialize the Update system.\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("E_Update Init Done"); TS("E_Update Init Done");
_e_main_shutdown_push(e_update_shutdown); _e_main_shutdown_push(e_update_shutdown);
@ -1025,7 +1025,7 @@ main(int argc, char **argv)
if (!e_deskenv_init()) if (!e_deskenv_init())
{ {
e_error_message_show(_("Enlightenment cannot initialize its desktop environment.\n")); e_error_message_show(_("Enlightenment cannot initialize its desktop environment.\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("E_Deskenv Init Done"); TS("E_Deskenv Init Done");
_e_main_shutdown_push(e_deskenv_shutdown); _e_main_shutdown_push(e_deskenv_shutdown);
@ -1034,7 +1034,7 @@ main(int argc, char **argv)
if (!e_order_init()) if (!e_order_init())
{ {
e_error_message_show(_("Enlightenment cannot set up its order file system.\n")); e_error_message_show(_("Enlightenment cannot set up its order file system.\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("E_Order Init Done"); TS("E_Order Init Done");
_e_main_shutdown_push(e_order_shutdown); _e_main_shutdown_push(e_order_shutdown);
@ -1077,7 +1077,7 @@ main(int argc, char **argv)
if (!e_shelf_init()) if (!e_shelf_init())
{ {
e_error_message_show(_("Enlightenment cannot set up its module system.\n")); e_error_message_show(_("Enlightenment cannot set up its module system.\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
e_shelf_config_update(); e_shelf_config_update();
TS("E_Shelf Init Done"); TS("E_Shelf Init Done");
@ -1155,7 +1155,7 @@ _e_main_shutdown(int errcode)
for (i = (_e_main_lvl - 1); i >= 0; i--) for (i = (_e_main_lvl - 1); i >= 0; i--)
(*_e_main_shutdown_func[i])(); (*_e_main_shutdown_func[i])();
if (errcode < 0) exit(errcode); if (errcode != 0) exit(errcode);
} }
static void static void
@ -1228,7 +1228,7 @@ _e_main_parse_arguments(int argc, char **argv)
(!strcmp(argv[i], "--version"))) (!strcmp(argv[i], "--version")))
{ {
printf(_("Version: %s\n"), PACKAGE_VERSION); printf(_("Version: %s\n"), PACKAGE_VERSION);
_e_main_shutdown(-1); _e_main_shutdown(0);
} }
else if ((!strcmp(argv[i], "-h")) || else if ((!strcmp(argv[i], "-h")) ||
(!strcmp(argv[i], "-help")) || (!strcmp(argv[i], "-help")) ||
@ -1261,7 +1261,7 @@ _e_main_parse_arguments(int argc, char **argv)
"\t-version\n" "\t-version\n"
) )
); );
_e_main_shutdown(-1); _e_main_shutdown(0);
} }
} }
@ -1296,20 +1296,15 @@ _e_main_parse_arguments(int argc, char **argv)
"will handle setting up environment variables, paths,\n" "will handle setting up environment variables, paths,\n"
"and launching any other required services etc.\n" "and launching any other required services etc.\n"
"before enlightenment itself begins running.\n")); "before enlightenment itself begins running.\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
} }
EINTERN void EINTERN void
_e_main_cb_x_fatal(void *data EINA_UNUSED) _e_main_cb_x_fatal(void *data EINA_UNUSED)
{ {
e_error_message_show("Lost X Connection.\n"); fprintf(stderr, "X I/O Error - fatal. Exiting.\n");
ecore_main_loop_quit(); exit(101);
if (!x_fatal)
{
x_fatal = EINA_TRUE;
if (inloop) longjmp(x_fatal_buff, -99);
}
} }
static Eina_Bool static Eina_Bool
@ -1559,7 +1554,7 @@ _e_main_screens_init(void)
if (!e_comp_init()) if (!e_comp_init())
{ {
e_error_message_show(_("Enlightenment cannot create a compositor.\n")); e_error_message_show(_("Enlightenment cannot create a compositor.\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("Compositor Init Done"); TS("Compositor Init Done");
@ -1572,7 +1567,7 @@ _e_main_screens_init(void)
if (!e_dnd_init()) if (!e_dnd_init())
{ {
e_error_message_show(_("Enlightenment cannot set up its dnd system.\n")); e_error_message_show(_("Enlightenment cannot set up its dnd system.\n"));
_e_main_shutdown(-1); _e_main_shutdown(101);
} }
TS("E_Dnd Init Done"); TS("E_Dnd Init Done");
_e_main_shutdown_push(e_dnd_shutdown); _e_main_shutdown_push(e_dnd_shutdown);

View File

@ -850,6 +850,12 @@ not_done:
restart = EINA_TRUE; restart = EINA_TRUE;
done = EINA_TRUE; done = EINA_TRUE;
} }
else if (WEXITSTATUS(status) == 101)
{
printf("Explici error exit from enlightenment\n");
restart = EINA_FALSE;
done = EINA_TRUE;
}
else if (WEXITSTATUS(status) == 0) else if (WEXITSTATUS(status) == 0)
{ {
restart = EINA_FALSE; restart = EINA_FALSE;