summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/wee-command.c2
-rw-r--r--src/core/wee-util.c22
-rw-r--r--src/core/wee-util.h1
-rw-r--r--src/core/weechat.c2
4 files changed, 25 insertions, 2 deletions
diff --git a/src/core/wee-command.c b/src/core/wee-command.c
index 1aba43edc..165351908 100644
--- a/src/core/wee-command.c
+++ b/src/core/wee-command.c
@@ -5197,6 +5197,7 @@ void
command_reload_files ()
{
struct t_config_file *ptr_config_file;
+
for (ptr_config_file = config_files; ptr_config_file;
ptr_config_file = ptr_config_file->next_config)
{
@@ -5204,7 +5205,6 @@ command_reload_files ()
}
}
-
/*
* Callback for command "/reload": reloads a configuration file.
*/
diff --git a/src/core/wee-util.c b/src/core/wee-util.c
index 68270b554..a0976d9a2 100644
--- a/src/core/wee-util.c
+++ b/src/core/wee-util.c
@@ -465,6 +465,28 @@ util_signal_search (const char *name)
}
/*
+ * Gets a signal name with a signal number; only some commonly used signal
+ * names are supported here (see declaration of util_signals[]).
+ *
+ * Returns the pointer to the signal name, NULL if not found.
+ */
+
+const char *
+util_signal_search_number (int signal_number)
+{
+ int i;
+
+ for (i = 0; util_signals[i].name; i++)
+ {
+ if (util_signals[i].signal == signal_number)
+ return util_signals[i].name;
+ }
+
+ /* signal not found */
+ return NULL;
+}
+
+/*
* Catches a system signal.
*/
diff --git a/src/core/wee-util.h b/src/core/wee-util.h
index 872594935..49b481809 100644
--- a/src/core/wee-util.h
+++ b/src/core/wee-util.h
@@ -59,6 +59,7 @@ extern long util_parse_delay (const char *string_delay, long default_factor);
/* signal */
extern int util_signal_search (const char *name);
+extern const char *util_signal_search_number (int signal_number);
extern void util_catch_signal (int signum, void (*handler)(int));
/* files/directories */
diff --git a/src/core/weechat.c b/src/core/weechat.c
index 927a902d7..82178ce32 100644
--- a/src/core/weechat.c
+++ b/src/core/weechat.c
@@ -688,7 +688,7 @@ weechat_locale_check ()
}
/*
- * Callback for system signal SIGHUP: reloads config.
+ * Callback for system signal SIGHUP: reloads configuration.
*/
void