mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-25 16:31:13 +00:00
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>
This commit is contained in:
parent
7c5bc827b7
commit
be7480cb5a
@ -213,9 +213,12 @@ _procd_set_param() {
|
|||||||
json_add_string "" "$@"
|
json_add_string "" "$@"
|
||||||
json_close_array
|
json_close_array
|
||||||
;;
|
;;
|
||||||
nice|reload_signal)
|
nice)
|
||||||
json_add_int "$type" "$1"
|
json_add_int "$type" "$1"
|
||||||
;;
|
;;
|
||||||
|
reload_signal)
|
||||||
|
json_add_int "$type" $(kill -l "$1")
|
||||||
|
;;
|
||||||
pidfile|user|seccomp|capabilities)
|
pidfile|user|seccomp|capabilities)
|
||||||
json_add_string "$type" "$1"
|
json_add_string "$type" "$1"
|
||||||
;;
|
;;
|
||||||
|
Loading…
Reference in New Issue
Block a user