summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/server/process.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2013-06-14 16:22:51 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-06-14 17:26:30 +0100
commit441c699acbb4b443c705933c1fccee0d906a1262 (patch)
tree63816b0140acf3052a1b673ecd8d2400f3a528b3 /bitbake/lib/bb/server/process.py
parent6c058341f9b0bee6af2554d897a2623a2ea9a479 (diff)
downloadpoky-441c699acbb4b443c705933c1fccee0d906a1262.tar.gz
bitbake: compat/server/utils: Jettison pre python 2.7.3 workarounds
Now we've moved to require python 2.7.3, we can jettison the compatibility workarounds/hacks for older python versions. (Bitbake rev: a51c402304f2080a76720f9b31d6dfdbed393bba) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/server/process.py')
-rw-r--r--bitbake/lib/bb/server/process.py46
1 files changed, 0 insertions, 46 deletions
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py
index d73fe827e4..0d4a26ced0 100644
--- a/bitbake/lib/bb/server/process.py
+++ b/bitbake/lib/bb/server/process.py
@@ -142,52 +142,6 @@ class ProcessServer(Process, BaseImplServer):
142 def stop(self): 142 def stop(self):
143 self.keep_running.clear() 143 self.keep_running.clear()
144 144
145 def bootstrap_2_6_6(self):
146 """Pulled from python 2.6.6. Needed to ensure we have the fix from
147 http://bugs.python.org/issue5313 when running on python version 2.6.2
148 or lower."""
149
150 try:
151 self._children = set()
152 self._counter = itertools.count(1)
153 try:
154 sys.stdin.close()
155 sys.stdin = open(os.devnull)
156 except (OSError, ValueError):
157 pass
158 multiprocessing._current_process = self
159 util._finalizer_registry.clear()
160 util._run_after_forkers()
161 util.info('child process calling self.run()')
162 try:
163 self.run()
164 exitcode = 0
165 finally:
166 util._exit_function()
167 except SystemExit as e:
168 if not e.args:
169 exitcode = 1
170 elif type(e.args[0]) is int:
171 exitcode = e.args[0]
172 else:
173 sys.stderr.write(e.args[0] + '\n')
174 sys.stderr.flush()
175 exitcode = 1
176 except:
177 exitcode = 1
178 import traceback
179 sys.stderr.write('Process %s:\n' % self.name)
180 sys.stderr.flush()
181 traceback.print_exc()
182
183 util.info('process exiting with exitcode %d' % exitcode)
184 return exitcode
185
186 # Python versions 2.6.0 through 2.6.2 suffer from a multiprocessing bug
187 # which can result in a bitbake server hang during the parsing process
188 if (2, 6, 0) <= sys.version_info < (2, 6, 3):
189 _bootstrap = bootstrap_2_6_6
190
191class BitBakeProcessServerConnection(BitBakeBaseServerConnection): 145class BitBakeProcessServerConnection(BitBakeBaseServerConnection):
192 def __init__(self, serverImpl, ui_channel, event_queue): 146 def __init__(self, serverImpl, ui_channel, event_queue):
193 self.procserver = serverImpl 147 self.procserver = serverImpl