bitbake: Toaster: fix shutdown and extra threads

Fix typo in shutdown code to kill threads when "kill -0" is not enough.
Use the '--noreload' flag for 'runserver' so that there are no extra
and unaccounted threads.

[YOCTO #12555]

(Bitbake rev: 14079cb1fd497799548c677962d89c02a6d2bf92)

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
David Reyna 2018-05-28 20:26:58 -07:00 committed by Richard Purdie
parent 7e7ee662f5
commit 4c93959c55

View File

@ -68,7 +68,7 @@ webserverKillAll()
if [ -f ${pidfile} ]; then
pid=`cat ${pidfile}`
while kill -0 $pid 2>/dev/null; do
kill -SIGTERM -$pid 2>/dev/null
kill -SIGTERM $pid 2>/dev/null
sleep 1
done
rm ${pidfile}
@ -91,7 +91,7 @@ webserverStartAll()
echo "Starting webserver..."
$MANAGE runserver "$ADDR_PORT" \
$MANAGE runserver --noreload "$ADDR_PORT" \
</dev/null >>${BUILDDIR}/toaster_web.log 2>&1 \
& echo $! >${BUILDDIR}/.toastermain.pid