1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-02-24 13:37:51 +00:00

cgroups: fix run_into shutils

On some targets the run_into function is not passing all params to the
called application. This patch should fix that using shift to get a list
of all command parameters.

Moreovere, we use now exec to spawn the command execution, which avoids to
generate yet another shell to run the required command.
This commit is contained in:
Patrick Bellasi 2016-04-26 15:30:03 +01:00
parent c976189444
commit 96392fd6b5

View File

@ -90,8 +90,9 @@ cgroups_run_into() {
CGMOUNT=${CGMOUNT:-/sys/fs/cgroup/devlib_*} CGMOUNT=${CGMOUNT:-/sys/fs/cgroup/devlib_*}
# The control group we want to run into # The control group we want to run into
CGP=${1} CGP=${1}
shift 1
# The command to run # The command to run
CMD=${2} CMD="${@}"
# Execution under root CGgroup # Execution under root CGgroup
if [ "x/" == "x$CGP" ]; then if [ "x/" == "x$CGP" ]; then
@ -125,7 +126,8 @@ cgroups_run_into() {
fi fi
# Execute the command # Execute the command
$CMD exec $CMD
} }
cgroups_tasks_move() { cgroups_tasks_move() {