diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2005-12-10 09:41:18 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2005-12-10 09:41:18 +0000 |
commit | b7286b7e9f78926c252098805d5c5c3d4dfe0ee7 (patch) | |
tree | d3968e1636d1e2478b4f9170bcb4ac55259e16d2 /src/common/command.c | |
parent | c1b4ccace4858ac2e8a4a39486723bf0e12c58a2 (diff) | |
download | weechat-b7286b7e9f78926c252098805d5c5c3d4dfe0ee7.zip |
Fixed bugs with /upgrade command (FIFO pipe now closed before upgrade, and
WeeChat log file descriptor closed too)
Diffstat (limited to 'src/common/command.c')
-rw-r--r-- | src/common/command.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/common/command.c b/src/common/command.c index 0e29f676f..50dc1349b 100644 --- a/src/common/command.c +++ b/src/common/command.c @@ -33,6 +33,7 @@ #include "weelist.h" #include "weeconfig.h" #include "session.h" +#include "fifo.h" #include "../irc/irc.h" #include "../gui/gui.h" #include "../plugins/plugins.h" @@ -2865,6 +2866,13 @@ weechat_cmd_upgrade (int argc, char **argv) #endif (void) config_write (NULL); gui_end (); + fifo_remove (); + if (weechat_log_file) + fclose (weechat_log_file); +#ifdef HAVE_GNUTLS + gnutls_certificate_free_credentials (gnutls_xcred); + gnutls_global_deinit(); +#endif execvp (exec_args[0], exec_args); @@ -2876,12 +2884,12 @@ weechat_cmd_upgrade (int argc, char **argv) fprintf (stderr, _("%s exec failed (program: \"%s\"), exiting WeeChat\n"), WEECHAT_ERROR, exec_args[0]); - + free (exec_args[0]); free (exec_args[3]); free (filename); - weechat_shutdown (EXIT_FAILURE, 0); + exit (EXIT_FAILURE); /* never executed */ return -1; |