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:
parent
c976189444
commit
96392fd6b5
@ -90,8 +90,9 @@ cgroups_run_into() {
|
||||
CGMOUNT=${CGMOUNT:-/sys/fs/cgroup/devlib_*}
|
||||
# The control group we want to run into
|
||||
CGP=${1}
|
||||
shift 1
|
||||
# The command to run
|
||||
CMD=${2}
|
||||
CMD="${@}"
|
||||
|
||||
# Execution under root CGgroup
|
||||
if [ "x/" == "x$CGP" ]; then
|
||||
@ -125,7 +126,8 @@ cgroups_run_into() {
|
||||
fi
|
||||
|
||||
# Execute the command
|
||||
$CMD
|
||||
exec $CMD
|
||||
|
||||
}
|
||||
|
||||
cgroups_tasks_move() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user