[bitbake-devel] [PATCH 11/30] toaster: implement stop_bitbake function

brian avery avery.brian at gmail.com
Wed Dec 2 18:02:43 UTC 2015


From: Ed Bartosh <ed.bartosh at linux.intel.com>

Separated functionality of stopping bitbake server and observer
processes.

This functionality will be used by build controllers to restart
bitbake processes.

Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
Signed-off-by: brian avery <avery.brian at gmail.com>
---
 bin/toaster | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/bin/toaster b/bin/toaster
index eb83e9a..e82df9b 100755
--- a/bin/toaster
+++ b/bin/toaster
@@ -126,16 +126,20 @@ stop_system()
         kill `cat ${BUILDDIR}/.toasterui.pid` 2>/dev/null
         rm ${BUILDDIR}/.toasterui.pid
     fi
-    BBSERVER=0.0.0.0:-1 bitbake -m
-    unset BBSERVER
+    stop_bitbake
     webserverKillAll
-    # force stop any misbehaving bitbake server
-    lsof bitbake.lock | awk '{print $2}' | grep "[0-9]\+" | xargs -n1 -r kill
     trap - SIGHUP
     #trap - SIGCHLD
     INSTOPSYSTEM=0
 }
 
+stop_bitbake() {
+    BBSERVER=0.0.0.0:-1 bitbake -m
+    unset BBSERVER
+    # force stop any misbehaving bitbake server
+    lsof bitbake.lock | awk '{print $2}' | grep "[0-9]\+" | xargs -n1 -r kill
+}
+
 check_pidbyfile() {
     [ -e $1 ] && kill -0 `cat $1` 2>/dev/null
 }
-- 
1.9.1




More information about the bitbake-devel mailing list