summaryrefslogtreecommitdiff
path: root/src/core/weechat.c
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2014-06-22 10:31:11 +0200
committerSébastien Helleu <flashcode@flashtux.org>2014-07-14 20:03:39 +0200
commitde7e7585dd0cbf979061420f6997cb83d5b1195e (patch)
treebb67d5a3fa9027729e867ecde3d7fb7519ace8c1 /src/core/weechat.c
parent9935b336edc4094e66f8012e6ad0cb683be0344a (diff)
downloadweechat-de7e7585dd0cbf979061420f6997cb83d5b1195e.zip
core: do not exit WeeChat in weechat_end() (let the caller do that)
This is needed for automated tests, to exit with return code of tests.
Diffstat (limited to 'src/core/weechat.c')
-rw-r--r--src/core/weechat.c4
1 files changed, 2 insertions, 2 deletions
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 */
}