diff options
Diffstat (limited to 'src/core/wee-util.c')
-rw-r--r-- | src/core/wee-util.c | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/src/core/wee-util.c b/src/core/wee-util.c index f04a7cbfa..61a095645 100644 --- a/src/core/wee-util.c +++ b/src/core/wee-util.c @@ -115,16 +115,6 @@ struct t_rlimit_resource rlimit_resource[] = }; #endif /* HAVE_SYS_RESOURCE_H */ -struct t_util_signal util_signals[] = -{ { "hup", SIGHUP }, - { "int", SIGINT }, - { "quit", SIGQUIT }, - { "kill", SIGKILL }, - { "term", SIGTERM }, - { "usr1", SIGUSR1 }, - { "usr2", SIGUSR2 }, - { NULL, 0 }, -}; /* * Sets resource limit. @@ -440,68 +430,6 @@ util_parse_delay (const char *string_delay, long default_factor) } /* - * Gets a signal number with a name; only some commonly used signal names are - * supported here (see declaration of util_signals[]). - * - * Returns the signal number, -1 if not found. - */ - -int -util_signal_search (const char *name) -{ - int i; - - if (!name) - return -1; - - for (i = 0; util_signals[i].name; i++) - { - if (string_strcasecmp (util_signals[i].name, name) == 0) - return util_signals[i].signal; - } - - /* signal not found */ - return -1; -} - -/* - * 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. - */ - -void -util_catch_signal (int signum, void (*handler)(int)) -{ - struct sigaction act; - - sigemptyset (&act.sa_mask); - act.sa_flags = 0; - act.sa_handler = handler; - sigaction (signum, &act, NULL); -} - -/* * Returns the path to a temporary directory, the first valid directory in * this list: * - content of environment variable "TMPDIR" |