summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2015-12-02 10:02:43 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-12-07 17:37:08 +0000
commitbf25471341334415559447f57f17b00cfa576559 (patch)
treee560336e3e015f9b861811e7d77a495f5cdca0d7 /bitbake
parent7c2b22556bc6a173b98b4702d4a317b6d40ea093 (diff)
downloadpoky-bf25471341334415559447f57f17b00cfa576559.tar.gz
bitbake: toaster: implement stop_bitbake function
Separated functionality of stopping bitbake server and observer processes. This functionality will be used by build controllers to restart bitbake processes. (Bitbake rev: dd40d70b707a3ff59edfa69923d4d9b671928a66) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rwxr-xr-xbitbake/bin/toaster12
1 files changed, 8 insertions, 4 deletions
diff --git a/bitbake/bin/toaster b/bitbake/bin/toaster
index eb83e9afaa..e82df9b80b 100755
--- a/bitbake/bin/toaster
+++ b/bitbake/bin/toaster
@@ -126,16 +126,20 @@ stop_system()
126 kill `cat ${BUILDDIR}/.toasterui.pid` 2>/dev/null 126 kill `cat ${BUILDDIR}/.toasterui.pid` 2>/dev/null
127 rm ${BUILDDIR}/.toasterui.pid 127 rm ${BUILDDIR}/.toasterui.pid
128 fi 128 fi
129 BBSERVER=0.0.0.0:-1 bitbake -m 129 stop_bitbake
130 unset BBSERVER
131 webserverKillAll 130 webserverKillAll
132 # force stop any misbehaving bitbake server
133 lsof bitbake.lock | awk '{print $2}' | grep "[0-9]\+" | xargs -n1 -r kill
134 trap - SIGHUP 131 trap - SIGHUP
135 #trap - SIGCHLD 132 #trap - SIGCHLD
136 INSTOPSYSTEM=0 133 INSTOPSYSTEM=0
137} 134}
138 135
136stop_bitbake() {
137 BBSERVER=0.0.0.0:-1 bitbake -m
138 unset BBSERVER
139 # force stop any misbehaving bitbake server
140 lsof bitbake.lock | awk '{print $2}' | grep "[0-9]\+" | xargs -n1 -r kill
141}
142
139check_pidbyfile() { 143check_pidbyfile() {
140 [ -e $1 ] && kill -0 `cat $1` 2>/dev/null 144 [ -e $1 ] && kill -0 `cat $1` 2>/dev/null
141} 145}