diff --git a/src/core/weechat.c b/src/core/weechat.c index 65a65c64a..50dca27f2 100644 --- a/src/core/weechat.c +++ b/src/core/weechat.c @@ -486,7 +486,7 @@ weechat_shutdown (int return_code, int crash) if (crash) abort(); - else + else if (return_code >= 0) exit (return_code); } @@ -590,5 +590,5 @@ weechat_end (void (*gui_end_cb)(int clean_exit)) hdata_end (); /* end hdata */ secure_end (); /* end secured data */ string_end (); /* end string */ - weechat_shutdown (EXIT_SUCCESS, 0); /* quit WeeChat (oh no, why?) */ + weechat_shutdown (-1, 0); /* end other things */ } diff --git a/src/gui/curses/main.c b/src/gui/curses/main.c index a234610f2..4176b9085 100644 --- a/src/gui/curses/main.c +++ b/src/gui/curses/main.c @@ -41,6 +41,5 @@ main (int argc, char *argv[]) gui_main_loop (); weechat_end (&gui_main_end); - /* make C compiler happy (never executed) */ return EXIT_SUCCESS; }