From 8a0867d6c5b47c8697d1ddd815116a548433c718 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 22 Oct 2010 16:11:50 +0200 Subject: systemctl: introduce systemctl kill --- src/util.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/util.c') diff --git a/src/util.c b/src/util.c index 58f67b0d15..cf3cf292a0 100644 --- a/src/util.c +++ b/src/util.c @@ -3339,6 +3339,17 @@ DIR *xopendirat(int fd, const char *name) { return fdopendir(openat(fd, name, O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC)); } +int signal_from_string_try_harder(const char *s) { + int signo; + assert(s); + + if ((signo = signal_from_string(s)) <= 0) + if (startswith(s, "SIG")) + return signal_from_string(s+3); + + return signo; +} + static const char *const ioprio_class_table[] = { [IOPRIO_CLASS_NONE] = "none", [IOPRIO_CLASS_RT] = "realtime", -- cgit v1.2.3-54-g00ecf