diff options
author | Bastian Bittorf <bb@npl.de> | 2017-01-13 20:22:51 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2017-02-01 15:40:20 +0100 |
commit | be7480cb5a5a4879f41acb6e4f11c8759d178b75 (patch) | |
tree | 161609fdb8d5d7e3efae22266c741976350fe0ea | |
parent | 7c5bc827b70eaace4578bc39cb8995292d10758d (diff) | |
download | mtk-20170518-be7480cb5a5a4879f41acb6e4f11c8759d178b75.zip mtk-20170518-be7480cb5a5a4879f41acb6e4f11c8759d178b75.tar.gz mtk-20170518-be7480cb5a5a4879f41acb6e4f11c8759d178b75.tar.bz2 |
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>
-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 8f18cda..a1b9f2f 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" ;; |