diff options
author | Bastian Bittorf <bb@npl.de> | 2017-01-13 20:22:51 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2017-01-26 18:07:37 +0100 |
commit | b54cbad6ef2fe592c1624915a84190759620f91c (patch) | |
tree | b0900e5b1ae9feabfa291ad6ba73a846f36d4c3f /package/system | |
parent | c7a7e7c94ea5cae7260779821648ccaaca6cb8dc (diff) | |
download | upstream-b54cbad6ef2fe592c1624915a84190759620f91c.tar.gz upstream-b54cbad6ef2fe592c1624915a84190759620f91c.tar.bz2 upstream-b54cbad6ef2fe592c1624915a84190759620f91c.zip |
procd: update procd.sh to disallow signal-numbers, enforce signal-names
A given signal-name is now converted to the corresonding number. In general
it's good style to use names (readability) and it's more portable: signal
numbers can be architecture-dependent, so we are more safe giving names.
A real world example is signal 10, which is BUS on ramips and USR1 on PPC.
All users of 'procd_send_signal' must change their code to reflect this.
Signed-off-by: Bastian Bittorf <bb@npl.de>
Diffstat (limited to 'package/system')
-rw-r--r-- | package/system/procd/files/procd.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/package/system/procd/files/procd.sh b/package/system/procd/files/procd.sh index 8f18cda70e..a1b9f2f0e9 100644 --- a/package/system/procd/files/procd.sh +++ b/package/system/procd/files/procd.sh @@ -213,9 +213,12 @@ _procd_set_param() { json_add_string "" "$@" json_close_array ;; - nice|reload_signal) + nice) json_add_int "$type" "$1" ;; + reload_signal) + json_add_int "$type" $(kill -l "$1") + ;; pidfile|user|seccomp|capabilities) json_add_string "$type" "$1" ;; |