aboutsummaryrefslogtreecommitdiffstats
path: root/package/system
diff options
context:
space:
mode:
authorBastian Bittorf <bb@npl.de>2017-01-13 20:22:51 +0100
committerJo-Philipp Wich <jo@mein.io>2017-02-01 15:40:20 +0100
commitbe7480cb5a5a4879f41acb6e4f11c8759d178b75 (patch)
tree161609fdb8d5d7e3efae22266c741976350fe0ea /package/system
parent7c5bc827b70eaace4578bc39cb8995292d10758d (diff)
downloadupstream-be7480cb5a5a4879f41acb6e4f11c8759d178b75.tar.gz
upstream-be7480cb5a5a4879f41acb6e4f11c8759d178b75.tar.bz2
upstream-be7480cb5a5a4879f41acb6e4f11c8759d178b75.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.sh5
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"
;;