summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2015-06-06 14:48:03 +0200
committerSébastien Helleu <flashcode@flashtux.org>2015-06-06 14:48:03 +0200
commit00abc2bde5b9adffcd0b987b07a68cc74edaea51 (patch)
tree12c857151218d19c3bcff62a669423aef2e972fb
parent160cbdb46a127e07be3ba77c41f95ce2c65b5ad5 (diff)
downloadweechat-00abc2bde5b9adffcd0b987b07a68cc74edaea51.zip
core: add signal "signal_sighup"
-rw-r--r--ChangeLog.asciidoc4
-rw-r--r--doc/en/weechat_plugin_api.en.asciidoc5
-rw-r--r--doc/fr/weechat_plugin_api.fr.asciidoc5
-rw-r--r--doc/it/weechat_plugin_api.it.asciidoc6
-rw-r--r--doc/ja/weechat_plugin_api.ja.asciidoc6
-rw-r--r--src/core/weechat.c13
6 files changed, 36 insertions, 3 deletions
diff --git a/ChangeLog.asciidoc b/ChangeLog.asciidoc
index 9c0e5ba1a..3d6587593 100644
--- a/ChangeLog.asciidoc
+++ b/ChangeLog.asciidoc
@@ -17,6 +17,10 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
== Version 1.3 (under dev)
+=== New features
+
+* core: add signal "signal_sighup"
+
=== Bugs fixed
* irc: fix errors displayed on WHOX messages received (closes #376)
diff --git a/doc/en/weechat_plugin_api.en.asciidoc b/doc/en/weechat_plugin_api.en.asciidoc
index a66528c0d..711a9ba11 100644
--- a/doc/en/weechat_plugin_api.en.asciidoc
+++ b/doc/en/weechat_plugin_api.en.asciidoc
@@ -8388,6 +8388,11 @@ List of signals sent by WeeChat and plugins:
String: arguments for /quit |
Command `/quit` issued by user
+| weechat | signal_sighup +
+ _(WeeChat ≥ 1.3)_ |
+ - |
+ Signal SIGHUP received
+
| weechat | signal_sigquit +
_(WeeChat ≥ 1.2)_ |
- |
diff --git a/doc/fr/weechat_plugin_api.fr.asciidoc b/doc/fr/weechat_plugin_api.fr.asciidoc
index 3657cf5a0..31c5a3086 100644
--- a/doc/fr/weechat_plugin_api.fr.asciidoc
+++ b/doc/fr/weechat_plugin_api.fr.asciidoc
@@ -8535,6 +8535,11 @@ 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 ≥ 1.3)_ |
+ - |
+ Signal SIGHUP reçu
+
| weechat | signal_sigquit +
_(WeeChat ≥ 1.2)_ |
- |
diff --git a/doc/it/weechat_plugin_api.it.asciidoc b/doc/it/weechat_plugin_api.it.asciidoc
index ae8788ac3..a7e792034 100644
--- a/doc/it/weechat_plugin_api.it.asciidoc
+++ b/doc/it/weechat_plugin_api.it.asciidoc
@@ -8626,6 +8626,12 @@ List of signals sent by WeeChat and plugins:
Comando `/quit` digitato dall'utente
// TRANSLATION MISSING
+| weechat | signal_sighup +
+ _(WeeChat ≥ 1.3)_ |
+ - |
+ Signal SIGHUP received
+
+// TRANSLATION MISSING
| weechat | signal_sigquit +
_(WeeChat ≥ 1.2)_ |
- |
diff --git a/doc/ja/weechat_plugin_api.ja.asciidoc b/doc/ja/weechat_plugin_api.ja.asciidoc
index 65e34d4c7..23acfecde 100644
--- a/doc/ja/weechat_plugin_api.ja.asciidoc
+++ b/doc/ja/weechat_plugin_api.ja.asciidoc
@@ -8387,6 +8387,12 @@ WeeChat とプラグインが送信するシグナルのリスト:
String: /quit の引数 |
ユーザがコマンド `/quit` を実行
+// TRANSLATION MISSING
+| weechat | signal_sighup +
+ _(WeeChat バージョン 1.3 以上で利用可)_ |
+ - |
+ Signal SIGHUP received
+
| weechat | signal_sigquit +
_(WeeChat バージョン 1.2 以上で利用可)_ |
- |
diff --git a/src/core/weechat.c b/src/core/weechat.c
index 6d23b2bea..2aaf6e216 100644
--- a/src/core/weechat.c
+++ b/src/core/weechat.c
@@ -509,9 +509,16 @@ weechat_locale_check ()
void
weechat_sighup ()
{
- log_printf (_("Signal %s received, exiting WeeChat..."), "SIGHUP");
- (void) hook_signal_send ("quit", WEECHAT_HOOK_SIGNAL_STRING, NULL);
- weechat_quit = 1;
+ int rc;
+
+ rc = hook_signal_send ("signal_sighup",
+ WEECHAT_HOOK_SIGNAL_STRING, NULL);
+ if (rc != WEECHAT_RC_OK_EAT)
+ {
+ log_printf (_("Signal %s received, exiting WeeChat..."), "SIGHUP");
+ (void) hook_signal_send ("quit", WEECHAT_HOOK_SIGNAL_STRING, NULL);
+ weechat_quit = 1;
+ }
}
/*