summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog.asciidoc1
-rw-r--r--doc/en/weechat_plugin_api.en.txt5
-rw-r--r--doc/fr/weechat_plugin_api.fr.txt5
-rw-r--r--doc/it/weechat_plugin_api.it.txt6
-rw-r--r--doc/ja/weechat_plugin_api.ja.txt5
-rw-r--r--src/gui/curses/gui-curses-main.c29
6 files changed, 7 insertions, 44 deletions
diff --git a/ChangeLog.asciidoc b/ChangeLog.asciidoc
index eeb76e3a1..a635fe234 100644
--- a/ChangeLog.asciidoc
+++ b/ChangeLog.asciidoc
@@ -15,6 +15,7 @@ http://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
== Version 0.4.4 (under dev)
+* core: quit WeeChat on signal SIGHUP, remove signal "signal_sighup"
* core: add text search in buffers with free content (task #13051)
* core: add buffer property "clear"
* core: fix add of filter on OS X when regex for message is empty (filter regex
diff --git a/doc/en/weechat_plugin_api.en.txt b/doc/en/weechat_plugin_api.en.txt
index 83f97bda6..a05c2acf2 100644
--- a/doc/en/weechat_plugin_api.en.txt
+++ b/doc/en/weechat_plugin_api.en.txt
@@ -8155,11 +8155,6 @@ List of signals sent by WeeChat and plugins:
String: arguments for /quit |
Command `/quit` issued by user
-| weechat | signal_sighup +
- _(WeeChat ≥ 0.4.3)_ |
- - |
- Signal SIGHUP received (WeeChat will reload the configuration files)
-
| weechat | signal_sigwinch +
_(WeeChat ≥ 0.4.3)_ |
- |
diff --git a/doc/fr/weechat_plugin_api.fr.txt b/doc/fr/weechat_plugin_api.fr.txt
index 3e74bd935..a5823f2ac 100644
--- a/doc/fr/weechat_plugin_api.fr.txt
+++ b/doc/fr/weechat_plugin_api.fr.txt
@@ -8296,11 +8296,6 @@ Liste des signaux envoyés par WeeChat et les extensions :
Chaîne : paramètres pour le /quit |
La commande `/quit` a été exécutée par l'utilisateur
-| weechat | signal_sighup +
- _(WeeChat ≥ 0.4.3)_ |
- - |
- Signal SIGHUP reçu (WeeChat va recharger les fichiers de configuration)
-
| weechat | signal_sigwinch +
_(WeeChat ≥ 0.4.3)_ |
- |
diff --git a/doc/it/weechat_plugin_api.it.txt b/doc/it/weechat_plugin_api.it.txt
index 23d11910f..50957ff8e 100644
--- a/doc/it/weechat_plugin_api.it.txt
+++ b/doc/it/weechat_plugin_api.it.txt
@@ -8344,12 +8344,6 @@ List of signals sent by WeeChat and plugins:
Comando `/quit` digitato dall'utente
// TRANSLATION MISSING
-| weechat | signal_sighup +
- _(WeeChat ≥ 0.4.3)_ |
- - |
- Signal SIGHUP received (WeeChat will reload the configuration files)
-
-// TRANSLATION MISSING
| weechat | signal_sigwinch +
_(WeeChat ≥ 0.4.3)_ |
- |
diff --git a/doc/ja/weechat_plugin_api.ja.txt b/doc/ja/weechat_plugin_api.ja.txt
index d825e1bdd..0fead7cf0 100644
--- a/doc/ja/weechat_plugin_api.ja.txt
+++ b/doc/ja/weechat_plugin_api.ja.txt
@@ -8149,11 +8149,6 @@ WeeChat とプラグインが送信するシグナルのリスト:
String: /quit の引数 |
ユーザがコマンド `/quit` を実行
-| weechat | signal_sighup +
- _(WeeChat バージョン 0.4.3 以上で利用可)_ |
- - |
- SIGHUP シグナルを受信しました (WeeChat は設定ファイルを再読み込みします)
-
| weechat | signal_sigwinch +
_(WeeChat バージョン 0.4.3 以上で利用可)_ |
- |
diff --git a/src/gui/curses/gui-curses-main.c b/src/gui/curses/gui-curses-main.c
index 8bfd31882..ee4fdbb22 100644
--- a/src/gui/curses/gui-curses-main.c
+++ b/src/gui/curses/gui-curses-main.c
@@ -60,7 +60,6 @@
#include "gui-curses.h"
-int gui_reload_config = 0; /* 1 if config must be reloaded */
int gui_signal_sigwinch_received = 0; /* sigwinch signal (term resized) */
int gui_term_cols = 0; /* number of columns in terminal */
int gui_term_lines = 0; /* number of lines in terminal */
@@ -274,21 +273,16 @@ gui_main_signal_sigterm ()
}
/*
- * Callback for system signal SIGHUP: reloads WeeChat configuration.
+ * Callback for system signal SIGHUP: quits WeeChat.
*/
void
gui_main_signal_sighup ()
{
- /*
- * SIGHUP signal is received when terminal is closed (exit of WeeChat
- * without using /quit command), that's why we set only flag to reload
- * configuration files later (when terminal is closed, config files are NOT
- * reloaded, but they are if signal SIGHUP is sent to WeeChat by user)
- */
- gui_reload_config = 1;
-
- (void) hook_signal_send ("signal_sighup", WEECHAT_HOOK_SIGNAL_STRING, NULL);
+ log_printf (_("Signal %s received, exiting WeeChat..."),
+ "SIGHUP");
+ (void) hook_signal_send ("quit", WEECHAT_HOOK_SIGNAL_STRING, NULL);
+ weechat_quit = 1;
}
/*
@@ -438,11 +432,9 @@ gui_main_loop ()
int max_fd;
int ready;
- /* catch SIGTERM signal: quit program */
+ /* catch SIGTERM/SIGQUIT/SIGHUP signals: quit program */
util_catch_signal (SIGTERM, &gui_main_signal_sigterm);
util_catch_signal (SIGQUIT, &gui_main_signal_sigquit);
-
- /* catch SIGHUP signal: reload configuration */
util_catch_signal (SIGHUP, &gui_main_signal_sighup);
/* catch SIGWINCH signal: redraw screen */
@@ -456,15 +448,6 @@ gui_main_loop ()
while (!weechat_quit)
{
- /* reload config, if SIGHUP received */
- if (gui_reload_config)
- {
- gui_reload_config = 0;
- log_printf (_("Signal SIGHUP received, reloading configuration "
- "files"));
- command_reload (NULL, NULL, 0, NULL, NULL);
- }
-
/* execute hook timers */
hook_timer_exec ();