diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-02-18 11:43:32 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-02-18 11:54:28 +0000 |
commit | 359a4d8bf72867b4d5f3daaf8c4f14a82a810107 (patch) | |
tree | 50ba2f22166be41d8c6ea712b99242f7641bf2c1 /bitbake/lib/bb/server | |
parent | 15751138968ecaca42b247685142e5f495d6eccd (diff) | |
download | openembedded-core-359a4d8bf72867b4d5f3daaf8c4f14a82a810107.tar.gz openembedded-core-359a4d8bf72867b4d5f3daaf8c4f14a82a810107.tar.bz2 openembedded-core-359a4d8bf72867b4d5f3daaf8c4f14a82a810107.tar.xz openembedded-core-359a4d8bf72867b4d5f3daaf8c4f14a82a810107.zip |
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.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bitbake/lib/bb/server/none.py b/bitbake/lib/bb/server/none.py index 2708807df..be0fb8f77 100644 --- a/bitbake/lib/bb/server/none.py +++ b/bitbake/lib/bb/server/none.py @@ -36,6 +36,7 @@ import bb from bb.ui import uievent import xmlrpclib import pickle +import signal DEBUG = False @@ -105,6 +106,10 @@ class BBUIEventQueue: def system_quit( self ): bb.event.unregister_UIHhandler(self.EventHandle) +# Dummy signal handler to ensure we break out of sleep upon SIGCHLD +def chldhandler(signum, stackframe): + pass + class BitBakeServer(): # remove this when you're done with debugging # allow_reuse_address = True @@ -144,7 +149,9 @@ class BitBakeServer(): pass if nextsleep is not None: #print "Sleeping for %s (%s)" % (nextsleep, delay) + signal.signal(signal.SIGCHLD, chldhandler) time.sleep(nextsleep) + signal.signal(signal.SIGCHLD, signal.SIG_DFL) def server_exit(self): # Tell idle functions we're exiting |