Skip to contentSkip to conversation

ster: fix shutdown and extra threads

PATCH New David Reyna 1 participant 1 message Feb 15, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ster: fix shutdown and extra threads

From: David Reyna <[email protected]>

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/bin/toaster | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
bitbake/bin/toaster +2 -2
index 4036f0a..ed365ee 100755
@@ -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
 
Signature · 1 line
2.7.4