diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-10-22 16:11:50 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-10-22 16:11:50 +0200 |
commit | 8a0867d6c5b47c8697d1ddd815116a548433c718 (patch) | |
tree | 56c81885c60e6b23f543d82c91a901d2fde14791 /src/util.c | |
parent | 95e501f8ab28e1645453219523c0263754db3f68 (diff) |
systemctl: introduce systemctl kill
Diffstat (limited to 'src/util.c')
-rw-r--r-- | src/util.c | 11 |
1 files changed, 11 insertions, 0 deletions
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", |