summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/server
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-18 11:43:32 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-02-18 11:54:28 +0000
commit359a4d8bf72867b4d5f3daaf8c4f14a82a810107 (patch)
tree50ba2f22166be41d8c6ea712b99242f7641bf2c1 /bitbake/lib/bb/server
parent15751138968ecaca42b247685142e5f495d6eccd (diff)
downloadpoky-359a4d8bf72867b4d5f3daaf8c4f14a82a810107.tar.gz
bitbake/runqueue.py: Move SIGCHLD handler to wrap none server sleep call
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/server')
-rw-r--r--bitbake/lib/bb/server/none.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/bitbake/lib/bb/server/none.py b/bitbake/lib/bb/server/none.py
index 2708807dfc..be0fb8f776 100644
--- a/bitbake/lib/bb/server/none.py
+++ b/bitbake/lib/bb/server/none.py
@@ -36,6 +36,7 @@ import bb
36from bb.ui import uievent 36from bb.ui import uievent
37import xmlrpclib 37import xmlrpclib
38import pickle 38import pickle
39import signal
39 40
40DEBUG = False 41DEBUG = False
41 42
@@ -105,6 +106,10 @@ class BBUIEventQueue:
105 def system_quit( self ): 106 def system_quit( self ):
106 bb.event.unregister_UIHhandler(self.EventHandle) 107 bb.event.unregister_UIHhandler(self.EventHandle)
107 108
109# Dummy signal handler to ensure we break out of sleep upon SIGCHLD
110def chldhandler(signum, stackframe):
111 pass
112
108class BitBakeServer(): 113class BitBakeServer():
109 # remove this when you're done with debugging 114 # remove this when you're done with debugging
110 # allow_reuse_address = True 115 # allow_reuse_address = True
@@ -144,7 +149,9 @@ class BitBakeServer():
144 pass 149 pass
145 if nextsleep is not None: 150 if nextsleep is not None:
146 #print "Sleeping for %s (%s)" % (nextsleep, delay) 151 #print "Sleeping for %s (%s)" % (nextsleep, delay)
152 signal.signal(signal.SIGCHLD, chldhandler)
147 time.sleep(nextsleep) 153 time.sleep(nextsleep)
154 signal.signal(signal.SIGCHLD, signal.SIG_DFL)
148 155
149 def server_exit(self): 156 def server_exit(self):
150 # Tell idle functions we're exiting 157 # Tell idle functions we're exiting