From: Darren Etheridge <[email protected]> busybox pidof doesn't omit the current pid as this script is called weston on the target in thinlinux with a busybox based utility load later killproc operations end up killing this script, which leads to the script not actually starting weston.
Signed-off-by: Darren Etheridge <[email protected]> Signed-off-by: Ryan Eatmon <[email protected]> Signed-off-by: Denys Dmytriyenko <[email protected]> --- .../recipes-graphics/wayland/weston-init/init | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/meta-arago-distro/recipes-graphics/wayland/weston-init/init b/meta-arago-distro/recipes-graphics/wayland/weston-init/init index 7a80238b..fa3f0372 100644 --- a/meta-arago-distro/recipes-graphics/wayland/weston-init/init +++ b/meta-arago-distro/recipes-graphics/wayland/weston-init/init @@ -9,8 +9,21 @@ ### END INIT INFO killproc() { - pid=`/bin/pidof $1` - [ "$pid" != "" ] && kill $pid + all_pids=`/bin/pidof $1` + + # busybox pidof doesn't ommit the current pid + # as this script is called weston on the target + # in thinlinux with a busybox based utility load + # later killproc operations end up killing this + # script. + for pid in $all_pids + do + if [ "$pid" != "$$" ]; then + kill_pids+=$pid + fi + done + + [ "$kill_pids" != "" ] && kill $kill_pids } read CMDLINE < /proc/cmdline -- 2.25.1 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#14030): https://lists.yoctoproject.org/g/meta-arago/message/14030 Mute This Topic: https://lists.yoctoproject.org/mt/93649131/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/meta-arago/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
