From bf25471341334415559447f57f17b00cfa576559 Mon Sep 17 00:00:00 2001 From: Ed Bartosh Date: Wed, 2 Dec 2015 10:02:43 -0800 Subject: 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 Signed-off-by: brian avery Signed-off-by: Richard Purdie --- bitbake/bin/toaster | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'bitbake/bin/toaster') 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() 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 } -- cgit v1.2.3-54-g00ecf