summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-07-20 14:21:20 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-07-26 17:31:42 +0100
commit59dba6192a0b72693941c59a95e18a3982bad443 (patch)
treedb7b728c99767456ffc6d17f264dc43b013c29b7
parentcaaff77b423b8b1d566d6b951da8e2b49f8f7bde (diff)
exit codes - clean up and handle consistently
also x io error - exit as we must.
-rw-r--r--src/bin/e_comp_canvas.c2
-rw-r--r--src/bin/e_hints.c2
-rw-r--r--src/bin/e_ipc.c2
-rw-r--r--src/bin/e_main.c139
-rw-r--r--src/bin/e_start_main.c6
5 files changed, 76 insertions, 75 deletions
diff --git a/src/bin/e_comp_canvas.c b/src/bin/e_comp_canvas.c
index 5003be5c8..ebf97b07e 100644
--- a/src/bin/e_comp_canvas.c
+++ b/src/bin/e_comp_canvas.c
@@ -31,7 +31,7 @@ _e_comp_canvas_cb_first_frame(void *data EINA_UNUSED, Evas *e, void *event_info
31 { 31 {
32 case 'A': abort(); 32 case 'A': abort();
33 case 'E': 33 case 'E':
34 case 'D': exit(-1); 34 case 'D': exit(101);
35 case 'T': fprintf(stderr, "Startup time: '%f' - '%f' = '%f'\n", now, e_first_frame_start_time, now - e_first_frame_start_time); 35 case 'T': fprintf(stderr, "Startup time: '%f' - '%f' = '%f'\n", now, e_first_frame_start_time, now - e_first_frame_start_time);
36 break; 36 break;
37 } 37 }
diff --git a/src/bin/e_hints.c b/src/bin/e_hints.c
index 07ff3ad7e..ca9d9a6ae 100644
--- a/src/bin/e_hints.c
+++ b/src/bin/e_hints.c
@@ -185,7 +185,7 @@ e_hints_init(Ecore_Window root, Ecore_Window propwin)
185 { 185 {
186 e_error_message_show(_("A previous instance of Enlightenment is still active\n" 186 e_error_message_show(_("A previous instance of Enlightenment is still active\n"
187 "on this screen. Aborting startup.\n")); 187 "on this screen. Aborting startup.\n"));
188 exit(1); 188 exit(101);
189 } 189 }
190 /* get/check agan */ 190 /* get/check agan */
191 nwins = ecore_x_window_prop_window_get(root, 191 nwins = ecore_x_window_prop_window_get(root,
diff --git a/src/bin/e_ipc.c b/src/bin/e_ipc.c
index 2e131baa6..20a3c7ca3 100644
--- a/src/bin/e_ipc.c
+++ b/src/bin/e_ipc.c
@@ -191,7 +191,7 @@ _e_ipc_cb_client_data(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
191 break; 191 break;
192 192
193 case E_ALERT_OP_EXIT: 193 case E_ALERT_OP_EXIT:
194 exit(-11); 194 exit(101);
195 break; 195 break;
196 } 196 }
197 } 197 }
diff --git a/src/bin/e_main.c b/src/bin/e_main.c
index e9a594468..e6950c303 100644
--- a/src/bin/e_main.c
+++ b/src/bin/e_main.c
@@ -295,7 +295,7 @@ main(int argc, char **argv)
295 if (!eina_init()) 295 if (!eina_init())
296 { 296 {
297 e_error_message_show(_("Enlightenment cannot initialize Eina!\n")); 297 e_error_message_show(_("Enlightenment cannot initialize Eina!\n"));
298 _e_main_shutdown(-1); 298 _e_main_shutdown(101);
299 } 299 }
300 eina_file_statgen_enable(); 300 eina_file_statgen_enable();
301 301
@@ -304,7 +304,7 @@ main(int argc, char **argv)
304 if (!e_log_init()) 304 if (!e_log_init())
305 { 305 {
306 e_error_message_show(_("Enlightenment could not create a logging domain!\n")); 306 e_error_message_show(_("Enlightenment could not create a logging domain!\n"));
307 _e_main_shutdown(-1); 307 _e_main_shutdown(101);
308 } 308 }
309#ifdef TS_DO 309#ifdef TS_DO
310#undef TS 310#undef TS
@@ -367,7 +367,7 @@ main(int argc, char **argv)
367 if (!eet_init()) 367 if (!eet_init())
368 { 368 {
369 e_error_message_show(_("Enlightenment cannot initialize Eet!\n")); 369 e_error_message_show(_("Enlightenment cannot initialize Eet!\n"));
370 _e_main_shutdown(-1); 370 _e_main_shutdown(101);
371 } 371 }
372 TS("Eet Init Done"); 372 TS("Eet Init Done");
373 _e_main_shutdown_push(eet_shutdown); 373 _e_main_shutdown_push(eet_shutdown);
@@ -376,7 +376,7 @@ main(int argc, char **argv)
376 if (!ecore_init()) 376 if (!ecore_init())
377 { 377 {
378 e_error_message_show(_("Enlightenment cannot initialize Ecore!\n")); 378 e_error_message_show(_("Enlightenment cannot initialize Ecore!\n"));
379 _e_main_shutdown(-1); 379 _e_main_shutdown(101);
380 } 380 }
381 TS("Ecore Init Done"); 381 TS("Ecore Init Done");
382 _e_main_shutdown_push(ecore_shutdown); 382 _e_main_shutdown_push(ecore_shutdown);
@@ -395,7 +395,7 @@ main(int argc, char **argv)
395 if (!e_efx_init()) 395 if (!e_efx_init())
396 { 396 {
397 e_error_message_show(_("Enlightenment cannot initialize EFX!\n")); 397 e_error_message_show(_("Enlightenment cannot initialize EFX!\n"));
398 _e_main_shutdown(-1); 398 _e_main_shutdown(101);
399 } 399 }
400 TS("EFX Init Done"); 400 TS("EFX Init Done");
401 _e_main_shutdown_push((void*)e_efx_shutdown); 401 _e_main_shutdown_push((void*)e_efx_shutdown);
@@ -404,7 +404,7 @@ main(int argc, char **argv)
404 if (!eio_init()) 404 if (!eio_init())
405 { 405 {
406 e_error_message_show(_("Enlightenment cannot initialize EIO!\n")); 406 e_error_message_show(_("Enlightenment cannot initialize EIO!\n"));
407 _e_main_shutdown(-1); 407 _e_main_shutdown(101);
408 } 408 }
409 TS("EIO Init Done"); 409 TS("EIO Init Done");
410 _e_main_shutdown_push(eio_shutdown); 410 _e_main_shutdown_push(eio_shutdown);
@@ -417,21 +417,21 @@ main(int argc, char **argv)
417 { 417 {
418 e_error_message_show(_("Enlightenment cannot set up an exit signal handler.\n" 418 e_error_message_show(_("Enlightenment cannot set up an exit signal handler.\n"
419 "Perhaps you are out of memory?")); 419 "Perhaps you are out of memory?"));
420 _e_main_shutdown(-1); 420 _e_main_shutdown(101);
421 } 421 }
422 if (!ecore_event_handler_add(ECORE_EVENT_SIGNAL_HUP, 422 if (!ecore_event_handler_add(ECORE_EVENT_SIGNAL_HUP,
423 _e_main_cb_signal_hup, NULL)) 423 _e_main_cb_signal_hup, NULL))
424 { 424 {
425 e_error_message_show(_("Enlightenment cannot set up a HUP signal handler.\n" 425 e_error_message_show(_("Enlightenment cannot set up a HUP signal handler.\n"
426 "Perhaps you are out of memory?")); 426 "Perhaps you are out of memory?"));
427 _e_main_shutdown(-1); 427 _e_main_shutdown(101);
428 } 428 }
429 if (!ecore_event_handler_add(ECORE_EVENT_SIGNAL_USER, 429 if (!ecore_event_handler_add(ECORE_EVENT_SIGNAL_USER,
430 _e_main_cb_signal_user, NULL)) 430 _e_main_cb_signal_user, NULL))
431 { 431 {
432 e_error_message_show(_("Enlightenment cannot set up a USER signal handler.\n" 432 e_error_message_show(_("Enlightenment cannot set up a USER signal handler.\n"
433 "Perhaps you are out of memory?")); 433 "Perhaps you are out of memory?"));
434 _e_main_shutdown(-1); 434 _e_main_shutdown(101);
435 } 435 }
436 TS("Ecore Event Handlers Done"); 436 TS("Ecore Event Handlers Done");
437 437
@@ -439,7 +439,7 @@ main(int argc, char **argv)
439 if (!ecore_file_init()) 439 if (!ecore_file_init())
440 { 440 {
441 e_error_message_show(_("Enlightenment cannot initialize Ecore_File!\n")); 441 e_error_message_show(_("Enlightenment cannot initialize Ecore_File!\n"));
442 _e_main_shutdown(-1); 442 _e_main_shutdown(101);
443 } 443 }
444 TS("Ecore_File Init Done"); 444 TS("Ecore_File Init Done");
445 _e_main_shutdown_push(ecore_file_shutdown); 445 _e_main_shutdown_push(ecore_file_shutdown);
@@ -448,7 +448,7 @@ main(int argc, char **argv)
448 if (!ecore_con_init()) 448 if (!ecore_con_init())
449 { 449 {
450 e_error_message_show(_("Enlightenment cannot initialize Ecore_Con!\n")); 450 e_error_message_show(_("Enlightenment cannot initialize Ecore_Con!\n"));
451 _e_main_shutdown(-1); 451 _e_main_shutdown(101);
452 } 452 }
453 TS("Ecore_Con Init Done"); 453 TS("Ecore_Con Init Done");
454 _e_main_shutdown_push(ecore_con_shutdown); 454 _e_main_shutdown_push(ecore_con_shutdown);
@@ -457,7 +457,7 @@ main(int argc, char **argv)
457 if (!ecore_ipc_init()) 457 if (!ecore_ipc_init())
458 { 458 {
459 e_error_message_show(_("Enlightenment cannot initialize Ecore_Ipc!\n")); 459 e_error_message_show(_("Enlightenment cannot initialize Ecore_Ipc!\n"));
460 _e_main_shutdown(-1); 460 _e_main_shutdown(101);
461 } 461 }
462 TS("Ecore_Ipc Init Done"); 462 TS("Ecore_Ipc Init Done");
463 _e_main_shutdown_push(ecore_ipc_shutdown); 463 _e_main_shutdown_push(ecore_ipc_shutdown);
@@ -468,7 +468,7 @@ main(int argc, char **argv)
468 if (!ecore_evas_init()) 468 if (!ecore_evas_init())
469 { 469 {
470 e_error_message_show(_("Enlightenment cannot initialize Ecore_Evas!\n")); 470 e_error_message_show(_("Enlightenment cannot initialize Ecore_Evas!\n"));
471 _e_main_shutdown(-1); 471 _e_main_shutdown(101);
472 } 472 }
473 TS("Ecore_Evas Init Done"); 473 TS("Ecore_Evas Init Done");
474// _e_main_shutdown_push(ecore_evas_shutdown); 474// _e_main_shutdown_push(ecore_evas_shutdown);
@@ -477,7 +477,7 @@ main(int argc, char **argv)
477 if (!elm_init(argc, argv)) 477 if (!elm_init(argc, argv))
478 { 478 {
479 e_error_message_show(_("Enlightenment cannot initialize Elementary!\n")); 479 e_error_message_show(_("Enlightenment cannot initialize Elementary!\n"));
480 _e_main_shutdown(-1); 480 _e_main_shutdown(101);
481 } 481 }
482 TS("Elementary Init Done"); 482 TS("Elementary Init Done");
483 //_e_main_shutdown_push(elm_shutdown); 483 //_e_main_shutdown_push(elm_shutdown);
@@ -486,7 +486,7 @@ main(int argc, char **argv)
486 if (!emotion_init()) 486 if (!emotion_init())
487 { 487 {
488 e_error_message_show(_("Enlightenment cannot initialize Emotion!\n")); 488 e_error_message_show(_("Enlightenment cannot initialize Emotion!\n"));
489 _e_main_shutdown(-1); 489 _e_main_shutdown(101);
490 } 490 }
491 TS("Emotion Init Done"); 491 TS("Emotion Init Done");
492 /* triggers event flush: do not call */ 492 /* triggers event flush: do not call */
@@ -502,7 +502,7 @@ main(int argc, char **argv)
502 e_error_message_show(_("Enlightenment found ecore_evas doesn't support the Wayland SHM\n" 502 e_error_message_show(_("Enlightenment found ecore_evas doesn't support the Wayland SHM\n"
503 "rendering in Evas. Please check your installation of Evas and\n" 503 "rendering in Evas. Please check your installation of Evas and\n"
504 "Ecore and check they support the Wayland SHM rendering engine.")); 504 "Ecore and check they support the Wayland SHM rendering engine."));
505 _e_main_shutdown(-1); 505 _e_main_shutdown(101);
506 } 506 }
507#else 507#else
508 if (!ecore_evas_engine_type_supported_get(ECORE_EVAS_ENGINE_SOFTWARE_XCB)) 508 if (!ecore_evas_engine_type_supported_get(ECORE_EVAS_ENGINE_SOFTWARE_XCB))
@@ -512,7 +512,7 @@ main(int argc, char **argv)
512 e_error_message_show(_("Enlightenment found ecore_evas doesn't support the Software X11\n" 512 e_error_message_show(_("Enlightenment found ecore_evas doesn't support the Software X11\n"
513 "rendering in Evas. Please check your installation of Evas and\n" 513 "rendering in Evas. Please check your installation of Evas and\n"
514 "Ecore and check they support the Software X11 rendering engine.")); 514 "Ecore and check they support the Software X11 rendering engine."));
515 _e_main_shutdown(-1); 515 _e_main_shutdown(101);
516 } 516 }
517 } 517 }
518#endif 518#endif
@@ -521,7 +521,7 @@ main(int argc, char **argv)
521 e_error_message_show(_("Enlightenment found ecore_evas doesn't support the Software Buffer\n" 521 e_error_message_show(_("Enlightenment found ecore_evas doesn't support the Software Buffer\n"
522 "rendering in Evas. Please check your installation of Evas and\n" 522 "rendering in Evas. Please check your installation of Evas and\n"
523 "Ecore and check they support the Software Buffer rendering engine.")); 523 "Ecore and check they support the Software Buffer rendering engine."));
524 _e_main_shutdown(-1); 524 _e_main_shutdown(101);
525 } 525 }
526 TS("Ecore_Evas Engine Check Done"); 526 TS("Ecore_Evas Engine Check Done");
527 527
@@ -533,7 +533,7 @@ main(int argc, char **argv)
533 if (!e_intl_init()) 533 if (!e_intl_init())
534 { 534 {
535 e_error_message_show(_("Enlightenment cannot initialize E_Intl!\n")); 535 e_error_message_show(_("Enlightenment cannot initialize E_Intl!\n"));
536 _e_main_shutdown(-1); 536 _e_main_shutdown(101);
537 } 537 }
538 TS("E Intl Init Done"); 538 TS("E Intl Init Done");
539 _e_main_shutdown_push(e_intl_shutdown); 539 _e_main_shutdown_push(e_intl_shutdown);
@@ -545,7 +545,7 @@ main(int argc, char **argv)
545 { 545 {
546 e_error_message_show(_("Enlightenment cannot initialize its emergency alert system.\n" 546 e_error_message_show(_("Enlightenment cannot initialize its emergency alert system.\n"
547 "Have you set your DISPLAY variable?")); 547 "Have you set your DISPLAY variable?"));
548 _e_main_shutdown(-1); 548 _e_main_shutdown(101);
549 } 549 }
550 TS("E_Alert Init Done"); 550 TS("E_Alert Init Done");
551 _e_main_shutdown_push(e_alert_shutdown); 551 _e_main_shutdown_push(e_alert_shutdown);
@@ -557,7 +557,7 @@ main(int argc, char **argv)
557 { 557 {
558 e_error_message_show(_("Enlightenment cannot create directories in your home directory.\n" 558 e_error_message_show(_("Enlightenment cannot create directories in your home directory.\n"
559 "Perhaps you have no home directory or the disk is full?")); 559 "Perhaps you have no home directory or the disk is full?"));
560 _e_main_shutdown(-1); 560 _e_main_shutdown(101);
561 } 561 }
562 TS("E Directories Init Done"); 562 TS("E Directories Init Done");
563 _e_main_shutdown_push(_e_main_dirs_shutdown); 563 _e_main_shutdown_push(_e_main_dirs_shutdown);
@@ -566,7 +566,7 @@ main(int argc, char **argv)
566 if (!e_filereg_init()) 566 if (!e_filereg_init())
567 { 567 {
568 e_error_message_show(_("Enlightenment cannot set up its file registry system.\n")); 568 e_error_message_show(_("Enlightenment cannot set up its file registry system.\n"));
569 _e_main_shutdown(-1); 569 _e_main_shutdown(101);
570 } 570 }
571 TS("E_Filereg Init Done"); 571 TS("E_Filereg Init Done");
572 _e_main_shutdown_push(e_filereg_shutdown); 572 _e_main_shutdown_push(e_filereg_shutdown);
@@ -575,7 +575,7 @@ main(int argc, char **argv)
575 if (!e_config_init()) 575 if (!e_config_init())
576 { 576 {
577 e_error_message_show(_("Enlightenment cannot set up its config system.\n")); 577 e_error_message_show(_("Enlightenment cannot set up its config system.\n"));
578 _e_main_shutdown(-1); 578 _e_main_shutdown(101);
579 } 579 }
580 TS("E_Config Init Done"); 580 TS("E_Config Init Done");
581 _e_main_shutdown_push(e_config_shutdown); 581 _e_main_shutdown_push(e_config_shutdown);
@@ -604,7 +604,7 @@ main(int argc, char **argv)
604 if (!e_env_init()) 604 if (!e_env_init())
605 { 605 {
606 e_error_message_show(_("Enlightenment cannot set up its environment.\n")); 606 e_error_message_show(_("Enlightenment cannot set up its environment.\n"));
607 _e_main_shutdown(-1); 607 _e_main_shutdown(101);
608 } 608 }
609 TS("E_Env Init Done"); 609 TS("E_Env Init Done");
610 _e_main_shutdown_push(e_env_shutdown); 610 _e_main_shutdown_push(e_env_shutdown);
@@ -623,7 +623,7 @@ main(int argc, char **argv)
623 { 623 {
624 e_error_message_show(_("Enlightenment cannot set up paths for finding files.\n" 624 e_error_message_show(_("Enlightenment cannot set up paths for finding files.\n"
625 "Perhaps you are out of memory?")); 625 "Perhaps you are out of memory?"));
626 _e_main_shutdown(-1); 626 _e_main_shutdown(101);
627 } 627 }
628 TS("E Paths Init Done"); 628 TS("E Paths Init Done");
629 _e_main_shutdown_push(_e_main_path_shutdown); 629 _e_main_shutdown_push(_e_main_path_shutdown);
@@ -675,7 +675,7 @@ main(int argc, char **argv)
675 TS("E_Precache Done"); 675 TS("E_Precache Done");
676 676
677 TS("E_Ipc Init"); 677 TS("E_Ipc Init");
678 if (!e_ipc_init()) _e_main_shutdown(-1); 678 if (!e_ipc_init()) _e_main_shutdown(101);
679 TS("E_Ipc Init Done"); 679 TS("E_Ipc Init Done");
680 _e_main_shutdown_push(e_ipc_shutdown); 680 _e_main_shutdown_push(e_ipc_shutdown);
681 681
@@ -683,7 +683,7 @@ main(int argc, char **argv)
683 if (!e_font_init()) 683 if (!e_font_init())
684 { 684 {
685 e_error_message_show(_("Enlightenment cannot set up its font system.\n")); 685 e_error_message_show(_("Enlightenment cannot set up its font system.\n"));
686 _e_main_shutdown(-1); 686 _e_main_shutdown(101);
687 } 687 }
688 TS("E_Font Init Done"); 688 TS("E_Font Init Done");
689 _e_main_shutdown_push(e_font_shutdown); 689 _e_main_shutdown_push(e_font_shutdown);
@@ -696,7 +696,7 @@ main(int argc, char **argv)
696 if (!e_theme_init()) 696 if (!e_theme_init())
697 { 697 {
698 e_error_message_show(_("Enlightenment cannot set up its theme system.\n")); 698 e_error_message_show(_("Enlightenment cannot set up its theme system.\n"));
699 _e_main_shutdown(-1); 699 _e_main_shutdown(101);
700 } 700 }
701 TS("E_Theme Init Done"); 701 TS("E_Theme Init Done");
702 _e_main_shutdown_push(e_theme_shutdown); 702 _e_main_shutdown_push(e_theme_shutdown);
@@ -714,7 +714,7 @@ main(int argc, char **argv)
714 e_error_message_show(_("Enlightenment cannot create a dbus session connection.\n" 714 e_error_message_show(_("Enlightenment cannot create a dbus session connection.\n"
715 "At best this will break many things, at worst it will hard lock your machine.\n" 715 "At best this will break many things, at worst it will hard lock your machine.\n"
716 "If you're sure you know what you're doing, export E_NO_DBUS_SESSION=1")); 716 "If you're sure you know what you're doing, export E_NO_DBUS_SESSION=1"));
717 _e_main_shutdown(-1); 717 _e_main_shutdown(101);
718 } 718 }
719 } 719 }
720 else 720 else
@@ -727,7 +727,7 @@ main(int argc, char **argv)
727 e_error_message_show(_("Enlightenment cannot initialize the FDO desktop system.\n" 727 e_error_message_show(_("Enlightenment cannot initialize the FDO desktop system.\n"
728 "Perhaps you lack permissions on ~/.cache/efreet or are\n" 728 "Perhaps you lack permissions on ~/.cache/efreet or are\n"
729 "out of memory or disk space?")); 729 "out of memory or disk space?"));
730 _e_main_shutdown(-1); 730 _e_main_shutdown(101);
731 } 731 }
732 TS("Efreet Init Done"); 732 TS("Efreet Init Done");
733 _e_main_shutdown_push(efreet_shutdown); 733 _e_main_shutdown_push(efreet_shutdown);
@@ -736,7 +736,7 @@ main(int argc, char **argv)
736 if (!e_intl_post_init()) 736 if (!e_intl_post_init())
737 { 737 {
738 e_error_message_show(_("Enlightenment cannot set up its intl system.\n")); 738 e_error_message_show(_("Enlightenment cannot set up its intl system.\n"));
739 _e_main_shutdown(-1); 739 _e_main_shutdown(101);
740 } 740 }
741 TS("E_Intl Post Init Done"); 741 TS("E_Intl Post Init Done");
742 _e_main_shutdown_push(e_intl_post_shutdown); 742 _e_main_shutdown_push(e_intl_post_shutdown);
@@ -751,7 +751,7 @@ main(int argc, char **argv)
751 if (!e_actions_init()) 751 if (!e_actions_init())
752 { 752 {
753 e_error_message_show(_("Enlightenment cannot set up its actions system.\n")); 753 e_error_message_show(_("Enlightenment cannot set up its actions system.\n"));
754 _e_main_shutdown(-1); 754 _e_main_shutdown(101);
755 } 755 }
756 TS("E_Actions Init Done"); 756 TS("E_Actions Init Done");
757 _e_main_shutdown_push(e_actions_shutdown); 757 _e_main_shutdown_push(e_actions_shutdown);
@@ -767,7 +767,7 @@ main(int argc, char **argv)
767 if (!e_system_init()) 767 if (!e_system_init())
768 { 768 {
769 e_error_message_show(_("Enlightenment cannot initialize the Privilege System access system.\n")); 769 e_error_message_show(_("Enlightenment cannot initialize the Privilege System access system.\n"));
770 _e_main_shutdown(-1); 770 _e_main_shutdown(101);
771 } 771 }
772 TS("E_System Init Done"); 772 TS("E_System Init Done");
773 _e_main_shutdown_push(e_system_shutdown); 773 _e_main_shutdown_push(e_system_shutdown);
@@ -776,7 +776,7 @@ main(int argc, char **argv)
776 if (!e_powersave_init()) 776 if (!e_powersave_init())
777 { 777 {
778 e_error_message_show(_("Enlightenment cannot set up its powersave modes.\n")); 778 e_error_message_show(_("Enlightenment cannot set up its powersave modes.\n"));
779 _e_main_shutdown(-1); 779 _e_main_shutdown(101);
780 } 780 }
781 TS("E_Powersave Init Done"); 781 TS("E_Powersave Init Done");
782 _e_main_shutdown_push(e_powersave_shutdown); 782 _e_main_shutdown_push(e_powersave_shutdown);
@@ -786,7 +786,7 @@ main(int argc, char **argv)
786 { 786 {
787 e_error_message_show(_("Enlightenment set up window management for all the screens on your system\n" 787 e_error_message_show(_("Enlightenment set up window management for all the screens on your system\n"
788 "failed. Perhaps another window manager is running?\n")); 788 "failed. Perhaps another window manager is running?\n"));
789 _e_main_shutdown(-1); 789 _e_main_shutdown(101);
790 } 790 }
791 TS("Screens Init Done"); 791 TS("Screens Init Done");
792 _e_main_shutdown_push(_e_main_screens_shutdown); 792 _e_main_shutdown_push(_e_main_screens_shutdown);
@@ -795,7 +795,7 @@ main(int argc, char **argv)
795 if (!e_pointer_init()) 795 if (!e_pointer_init())
796 { 796 {
797 e_error_message_show(_("Enlightenment cannot set up its pointer system.\n")); 797 e_error_message_show(_("Enlightenment cannot set up its pointer system.\n"));
798 _e_main_shutdown(-1); 798 _e_main_shutdown(101);
799 } 799 }
800 TS("E_Pointer Init Done"); 800 TS("E_Pointer Init Done");
801 _e_main_shutdown_push(e_pointer_shutdown); 801 _e_main_shutdown_push(e_pointer_shutdown);
@@ -805,7 +805,7 @@ main(int argc, char **argv)
805 if (!e_scale_init()) 805 if (!e_scale_init())
806 { 806 {
807 e_error_message_show(_("Enlightenment cannot set up its scale system.\n")); 807 e_error_message_show(_("Enlightenment cannot set up its scale system.\n"));
808 _e_main_shutdown(-1); 808 _e_main_shutdown(101);
809 } 809 }
810 TS("E_Scale Init Done"); 810 TS("E_Scale Init Done");
811 _e_main_shutdown_push(e_scale_shutdown); 811 _e_main_shutdown_push(e_scale_shutdown);
@@ -816,7 +816,7 @@ main(int argc, char **argv)
816 if (!e_init_init()) 816 if (!e_init_init())
817 { 817 {
818 e_error_message_show(_("Enlightenment cannot set up its init screen.\n")); 818 e_error_message_show(_("Enlightenment cannot set up its init screen.\n"));
819 _e_main_shutdown(-1); 819 _e_main_shutdown(101);
820 } 820 }
821 TS("E_Splash Init Done"); 821 TS("E_Splash Init Done");
822 _e_main_shutdown_push(e_init_shutdown); 822 _e_main_shutdown_push(e_init_shutdown);
@@ -847,7 +847,7 @@ main(int argc, char **argv)
847 if (!e_backlight_init()) 847 if (!e_backlight_init())
848 { 848 {
849 e_error_message_show(_("Enlightenment cannot configure the backlight.\n")); 849 e_error_message_show(_("Enlightenment cannot configure the backlight.\n"));
850 _e_main_shutdown(-1); 850 _e_main_shutdown(101);
851 } 851 }
852 TS("E_Backlight Init Done"); 852 TS("E_Backlight Init Done");
853 853
@@ -855,7 +855,7 @@ main(int argc, char **argv)
855 if (!e_dpms_init()) 855 if (!e_dpms_init())
856 { 856 {
857 e_error_message_show(_("Enlightenment cannot configure the DPMS settings.\n")); 857 e_error_message_show(_("Enlightenment cannot configure the DPMS settings.\n"));
858 _e_main_shutdown(-1); 858 _e_main_shutdown(101);
859 } 859 }
860 TS("E_Dpms Init Done"); 860 TS("E_Dpms Init Done");
861 _e_main_shutdown_push(e_dpms_shutdown); 861 _e_main_shutdown_push(e_dpms_shutdown);
@@ -864,7 +864,7 @@ main(int argc, char **argv)
864 if (!e_desklock_init()) 864 if (!e_desklock_init())
865 { 865 {
866 e_error_message_show(_("Enlightenment cannot set up its desk locking system.\n")); 866 e_error_message_show(_("Enlightenment cannot set up its desk locking system.\n"));
867 _e_main_shutdown(-1); 867 _e_main_shutdown(101);
868 } 868 }
869 TS("E_Desklock Init Done"); 869 TS("E_Desklock Init Done");
870 _e_main_shutdown_push(e_desklock_shutdown); 870 _e_main_shutdown_push(e_desklock_shutdown);
@@ -883,7 +883,7 @@ main(int argc, char **argv)
883 if (!e_sys_init()) 883 if (!e_sys_init())
884 { 884 {
885 e_error_message_show(_("Enlightenment cannot initialize the System Command system.\n")); 885 e_error_message_show(_("Enlightenment cannot initialize the System Command system.\n"));
886 _e_main_shutdown(-1); 886 _e_main_shutdown(101);
887 } 887 }
888 TS("E_Sys Init Done"); 888 TS("E_Sys Init Done");
889 _e_main_shutdown_push(e_sys_shutdown); 889 _e_main_shutdown_push(e_sys_shutdown);
@@ -892,7 +892,7 @@ main(int argc, char **argv)
892 if (!e_exec_init()) 892 if (!e_exec_init())
893 { 893 {
894 e_error_message_show(_("Enlightenment cannot set up its exec system.\n")); 894 e_error_message_show(_("Enlightenment cannot set up its exec system.\n"));
895 _e_main_shutdown(-1); 895 _e_main_shutdown(101);
896 } 896 }
897 TS("E_Exec Init Done"); 897 TS("E_Exec Init Done");
898 898
@@ -904,7 +904,7 @@ main(int argc, char **argv)
904 if (!e_fm2_init()) 904 if (!e_fm2_init())
905 { 905 {
906 e_error_message_show(_("Enlightenment cannot initialize the File manager.\n")); 906 e_error_message_show(_("Enlightenment cannot initialize the File manager.\n"));
907 _e_main_shutdown(-1); 907 _e_main_shutdown(101);
908 } 908 }
909 TS("E_Fm2 Init Done"); 909 TS("E_Fm2 Init Done");
910 _e_main_shutdown_push(e_fm2_shutdown); 910 _e_main_shutdown_push(e_fm2_shutdown);
@@ -913,7 +913,7 @@ main(int argc, char **argv)
913 if (!e_msg_init()) 913 if (!e_msg_init())
914 { 914 {
915 e_error_message_show(_("Enlightenment cannot set up its msg system.\n")); 915 e_error_message_show(_("Enlightenment cannot set up its msg system.\n"));
916 _e_main_shutdown(-1); 916 _e_main_shutdown(101);
917 } 917 }
918 TS("E_Msg Init Done"); 918 TS("E_Msg Init Done");
919 _e_main_shutdown_push(e_msg_shutdown); 919 _e_main_shutdown_push(e_msg_shutdown);
@@ -922,7 +922,7 @@ main(int argc, char **argv)
922 if (!e_grabinput_init()) 922 if (!e_grabinput_init())
923 { 923 {
924 e_error_message_show(_("Enlightenment cannot set up its grab input handling system.\n")); 924 e_error_message_show(_("Enlightenment cannot set up its grab input handling system.\n"));
925 _e_main_shutdown(-1); 925 _e_main_shutdown(101);
926 } 926 }
927 TS("E_Grabinput Init Done"); 927 TS("E_Grabinput Init Done");
928 _e_main_shutdown_push(e_grabinput_shutdown); 928 _e_main_shutdown_push(e_grabinput_shutdown);
@@ -931,7 +931,7 @@ main(int argc, char **argv)
931 if (!e_module_init()) 931 if (!e_module_init())
932 { 932 {
933 e_error_message_show(_("Enlightenment cannot set up its module system.\n")); 933 e_error_message_show(_("Enlightenment cannot set up its module system.\n"));
934 _e_main_shutdown(-1); 934 _e_main_shutdown(101);
935 } 935 }
936 TS("E_Module Init Done"); 936 TS("E_Module Init Done");
937 _e_main_shutdown_push(e_module_shutdown); 937 _e_main_shutdown_push(e_module_shutdown);
@@ -940,7 +940,7 @@ main(int argc, char **argv)
940 if (!e_remember_init(after_restart ? E_STARTUP_RESTART : E_STARTUP_START)) 940 if (!e_remember_init(after_restart ? E_STARTUP_RESTART : E_STARTUP_START))
941 { 941 {
942 e_error_message_show(_("Enlightenment cannot setup remember settings.\n")); 942 e_error_message_show(_("Enlightenment cannot setup remember settings.\n"));
943 _e_main_shutdown(-1); 943 _e_main_shutdown(101);
944 } 944 }
945 TS("E_Remember Init Done"); 945 TS("E_Remember Init Done");
946 _e_main_shutdown_push(e_remember_shutdown); 946 _e_main_shutdown_push(e_remember_shutdown);
@@ -954,7 +954,7 @@ main(int argc, char **argv)
954 if (!e_gadcon_init()) 954 if (!e_gadcon_init())
955 { 955 {
956 e_error_message_show(_("Enlightenment cannot set up its gadget control system.\n")); 956 e_error_message_show(_("Enlightenment cannot set up its gadget control system.\n"));
957 _e_main_shutdown(-1); 957 _e_main_shutdown(101);
958 } 958 }
959 TS("E_Gadcon Init Done"); 959 TS("E_Gadcon Init Done");
960 _e_main_shutdown_push(e_gadcon_shutdown); 960 _e_main_shutdown_push(e_gadcon_shutdown);
@@ -963,7 +963,7 @@ main(int argc, char **argv)
963 if (!e_toolbar_init()) 963 if (!e_toolbar_init())
964 { 964 {
965 e_error_message_show(_("Enlightenment cannot set up its toolbars.\n")); 965 e_error_message_show(_("Enlightenment cannot set up its toolbars.\n"));
966 _e_main_shutdown(-1); 966 _e_main_shutdown(101);
967 } 967 }
968 TS("E_Toolbar Init Done"); 968 TS("E_Toolbar Init Done");
969 _e_main_shutdown_push(e_toolbar_shutdown); 969 _e_main_shutdown_push(e_toolbar_shutdown);
@@ -972,7 +972,7 @@ main(int argc, char **argv)
972 if (!e_bg_init()) 972 if (!e_bg_init())
973 { 973 {
974 e_error_message_show(_("Enlightenment cannot set up its desktop background system.\n")); 974 e_error_message_show(_("Enlightenment cannot set up its desktop background system.\n"));
975 _e_main_shutdown(-1); 975 _e_main_shutdown(101);
976 } 976 }
977 TS("E_Bg Init Done"); 977 TS("E_Bg Init Done");
978 _e_main_shutdown_push(e_bg_shutdown); 978 _e_main_shutdown_push(e_bg_shutdown);
@@ -981,7 +981,7 @@ main(int argc, char **argv)
981 if (!e_mouse_update()) 981 if (!e_mouse_update())
982 { 982 {
983 e_error_message_show(_("Enlightenment cannot configure the mouse settings.\n")); 983 e_error_message_show(_("Enlightenment cannot configure the mouse settings.\n"));
984 _e_main_shutdown(-1); 984 _e_main_shutdown(101);
985 } 985 }
986 TS("E_Mouse Init Done"); 986 TS("E_Mouse Init Done");
987 987
@@ -989,7 +989,7 @@ main(int argc, char **argv)
989 if (!e_bindings_init()) 989 if (!e_bindings_init())
990 { 990 {
991 e_error_message_show(_("Enlightenment cannot set up its bindings system.\n")); 991 e_error_message_show(_("Enlightenment cannot set up its bindings system.\n"));
992 _e_main_shutdown(-1); 992 _e_main_shutdown(101);
993 } 993 }
994 TS("E_Bindings Init Done"); 994 TS("E_Bindings Init Done");
995 _e_main_shutdown_push(e_bindings_shutdown); 995 _e_main_shutdown_push(e_bindings_shutdown);
@@ -998,7 +998,7 @@ main(int argc, char **argv)
998 if (!e_thumb_init()) 998 if (!e_thumb_init())
999 { 999 {
1000 e_error_message_show(_("Enlightenment cannot initialize the Thumbnailing system.\n")); 1000 e_error_message_show(_("Enlightenment cannot initialize the Thumbnailing system.\n"));
1001 _e_main_shutdown(-1); 1001 _e_main_shutdown(101);
1002 } 1002 }
1003 TS("E_Thumb Init Done"); 1003 TS("E_Thumb Init Done");
1004 _e_main_shutdown_push(e_thumb_shutdown); 1004 _e_main_shutdown_push(e_thumb_shutdown);
@@ -1007,7 +1007,7 @@ main(int argc, char **argv)
1007 if (!e_icon_init()) 1007 if (!e_icon_init())
1008 { 1008 {
1009 e_error_message_show(_("Enlightenment cannot initialize the Icon Cache system.\n")); 1009 e_error_message_show(_("Enlightenment cannot initialize the Icon Cache system.\n"));
1010 _e_main_shutdown(-1); 1010 _e_main_shutdown(101);
1011 } 1011 }
1012 TS("E_Icon Init Done"); 1012 TS("E_Icon Init Done");
1013 _e_main_shutdown_push(e_icon_shutdown); 1013 _e_main_shutdown_push(e_icon_shutdown);
@@ -1016,7 +1016,7 @@ main(int argc, char **argv)
1016 if (!e_update_init()) 1016 if (!e_update_init())
1017 { 1017 {
1018 e_error_message_show(_("Enlightenment cannot initialize the Update system.\n")); 1018 e_error_message_show(_("Enlightenment cannot initialize the Update system.\n"));
1019 _e_main_shutdown(-1); 1019 _e_main_shutdown(101);
1020 } 1020 }
1021 TS("E_Update Init Done"); 1021 TS("E_Update Init Done");
1022 _e_main_shutdown_push(e_update_shutdown); 1022 _e_main_shutdown_push(e_update_shutdown);
@@ -1025,7 +1025,7 @@ main(int argc, char **argv)
1025 if (!e_deskenv_init()) 1025 if (!e_deskenv_init())
1026 { 1026 {
1027 e_error_message_show(_("Enlightenment cannot initialize its desktop environment.\n")); 1027 e_error_message_show(_("Enlightenment cannot initialize its desktop environment.\n"));
1028 _e_main_shutdown(-1); 1028 _e_main_shutdown(101);
1029 } 1029 }
1030 TS("E_Deskenv Init Done"); 1030 TS("E_Deskenv Init Done");
1031 _e_main_shutdown_push(e_deskenv_shutdown); 1031 _e_main_shutdown_push(e_deskenv_shutdown);
@@ -1034,7 +1034,7 @@ main(int argc, char **argv)
1034 if (!e_order_init()) 1034 if (!e_order_init())
1035 { 1035 {
1036 e_error_message_show(_("Enlightenment cannot set up its order file system.\n")); 1036 e_error_message_show(_("Enlightenment cannot set up its order file system.\n"));
1037 _e_main_shutdown(-1); 1037 _e_main_shutdown(101);
1038 } 1038 }
1039 TS("E_Order Init Done"); 1039 TS("E_Order Init Done");
1040 _e_main_shutdown_push(e_order_shutdown); 1040 _e_main_shutdown_push(e_order_shutdown);
@@ -1077,7 +1077,7 @@ main(int argc, char **argv)
1077 if (!e_shelf_init()) 1077 if (!e_shelf_init())
1078 { 1078 {
1079 e_error_message_show(_("Enlightenment cannot set up its module system.\n")); 1079 e_error_message_show(_("Enlightenment cannot set up its module system.\n"));
1080 _e_main_shutdown(-1); 1080 _e_main_shutdown(101);
1081 } 1081 }
1082 e_shelf_config_update(); 1082 e_shelf_config_update();
1083 TS("E_Shelf Init Done"); 1083 TS("E_Shelf Init Done");
@@ -1155,7 +1155,7 @@ _e_main_shutdown(int errcode)
1155 1155
1156 for (i = (_e_main_lvl - 1); i >= 0; i--) 1156 for (i = (_e_main_lvl - 1); i >= 0; i--)
1157 (*_e_main_shutdown_func[i])(); 1157 (*_e_main_shutdown_func[i])();
1158 if (errcode < 0) exit(errcode); 1158 if (errcode != 0) exit(errcode);
1159} 1159}
1160 1160
1161static void 1161static void
@@ -1228,7 +1228,7 @@ _e_main_parse_arguments(int argc, char **argv)
1228 (!strcmp(argv[i], "--version"))) 1228 (!strcmp(argv[i], "--version")))
1229 { 1229 {
1230 printf(_("Version: %s\n"), PACKAGE_VERSION); 1230 printf(_("Version: %s\n"), PACKAGE_VERSION);
1231 _e_main_shutdown(-1); 1231 _e_main_shutdown(0);
1232 } 1232 }
1233 else if ((!strcmp(argv[i], "-h")) || 1233 else if ((!strcmp(argv[i], "-h")) ||
1234 (!strcmp(argv[i], "-help")) || 1234 (!strcmp(argv[i], "-help")) ||
@@ -1261,7 +1261,7 @@ _e_main_parse_arguments(int argc, char **argv)
1261 "\t-version\n" 1261 "\t-version\n"
1262 ) 1262 )
1263 ); 1263 );
1264 _e_main_shutdown(-1); 1264 _e_main_shutdown(0);
1265 } 1265 }
1266 } 1266 }
1267 1267
@@ -1296,20 +1296,15 @@ _e_main_parse_arguments(int argc, char **argv)
1296 "will handle setting up environment variables, paths,\n" 1296 "will handle setting up environment variables, paths,\n"
1297 "and launching any other required services etc.\n" 1297 "and launching any other required services etc.\n"
1298 "before enlightenment itself begins running.\n")); 1298 "before enlightenment itself begins running.\n"));
1299 _e_main_shutdown(-1); 1299 _e_main_shutdown(101);
1300 } 1300 }
1301} 1301}
1302 1302
1303EINTERN void 1303EINTERN void
1304_e_main_cb_x_fatal(void *data EINA_UNUSED) 1304_e_main_cb_x_fatal(void *data EINA_UNUSED)
1305{ 1305{
1306 e_error_message_show("Lost X Connection.\n"); 1306 fprintf(stderr, "X I/O Error - fatal. Exiting.\n");
1307 ecore_main_loop_quit(); 1307 exit(101);
1308 if (!x_fatal)
1309 {
1310 x_fatal = EINA_TRUE;
1311 if (inloop) longjmp(x_fatal_buff, -99);
1312 }
1313} 1308}
1314 1309
1315static Eina_Bool 1310static Eina_Bool
@@ -1559,7 +1554,7 @@ _e_main_screens_init(void)
1559 if (!e_comp_init()) 1554 if (!e_comp_init())
1560 { 1555 {
1561 e_error_message_show(_("Enlightenment cannot create a compositor.\n")); 1556 e_error_message_show(_("Enlightenment cannot create a compositor.\n"));
1562 _e_main_shutdown(-1); 1557 _e_main_shutdown(101);
1563 } 1558 }
1564 TS("Compositor Init Done"); 1559 TS("Compositor Init Done");
1565 1560
@@ -1572,7 +1567,7 @@ _e_main_screens_init(void)
1572 if (!e_dnd_init()) 1567 if (!e_dnd_init())
1573 { 1568 {
1574 e_error_message_show(_("Enlightenment cannot set up its dnd system.\n")); 1569 e_error_message_show(_("Enlightenment cannot set up its dnd system.\n"));
1575 _e_main_shutdown(-1); 1570 _e_main_shutdown(101);
1576 } 1571 }
1577 TS("E_Dnd Init Done"); 1572 TS("E_Dnd Init Done");
1578 _e_main_shutdown_push(e_dnd_shutdown); 1573 _e_main_shutdown_push(e_dnd_shutdown);
diff --git a/src/bin/e_start_main.c b/src/bin/e_start_main.c
index abe4ce77c..cd2c743e0 100644
--- a/src/bin/e_start_main.c
+++ b/src/bin/e_start_main.c
@@ -850,6 +850,12 @@ not_done:
850 restart = EINA_TRUE; 850 restart = EINA_TRUE;
851 done = EINA_TRUE; 851 done = EINA_TRUE;
852 } 852 }
853 else if (WEXITSTATUS(status) == 101)
854 {
855 printf("Explici error exit from enlightenment\n");
856 restart = EINA_FALSE;
857 done = EINA_TRUE;
858 }
853 else if (WEXITSTATUS(status) == 0) 859 else if (WEXITSTATUS(status) == 0)
854 { 860 {
855 restart = EINA_FALSE; 861 restart = EINA_FALSE;