From: Bastian Bittorf Date: Fri, 13 Jan 2017 19:22:51 +0000 (+0100) Subject: procd: update procd.sh to disallow signal-numbers, enforce signal-names X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=b54cbad6ef2fe592c1624915a84190759620f91c;p=openwrt%2Fstaging%2Fansuel.git 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 --- 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" ;;