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/none.py | |
| parent | 15751138968ecaca42b247685142e5f495d6eccd (diff) | |
| download | poky-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/none.py')
| -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 2708807dfc..be0fb8f776 100644 --- a/bitbake/lib/bb/server/none.py +++ b/bitbake/lib/bb/server/none.py | |||
| @@ -36,6 +36,7 @@ import bb | |||
| 36 | from bb.ui import uievent | 36 | from bb.ui import uievent |
| 37 | import xmlrpclib | 37 | import xmlrpclib |
| 38 | import pickle | 38 | import pickle |
| 39 | import signal | ||
| 39 | 40 | ||
| 40 | DEBUG = False | 41 | DEBUG = 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 | ||
| 110 | def chldhandler(signum, stackframe): | ||
| 111 | pass | ||
| 112 | |||
| 108 | class BitBakeServer(): | 113 | class 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 |
