summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/server/process.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/server/process.py')
-rw-r--r--bitbake/lib/bb/server/process.py31
1 files changed, 18 insertions, 13 deletions
diff --git a/bitbake/lib/bb/server/process.py b/bitbake/lib/bb/server/process.py
index e4b9d96234..aefabbed01 100644
--- a/bitbake/lib/bb/server/process.py
+++ b/bitbake/lib/bb/server/process.py
@@ -133,19 +133,6 @@ class ProcessServer(multiprocessing.Process):
133 if self.xmlrpc: 133 if self.xmlrpc:
134 fds.append(self.xmlrpc) 134 fds.append(self.xmlrpc)
135 while not self.quit: 135 while not self.quit:
136 if self.command_channel in ready:
137 command = self.command_channel.get()
138 if command[0] == "terminateServer":
139 self.quit = True
140 continue
141 try:
142 print("Running command %s" % command)
143 self.command_channel_reply.send(self.cooker.command.runCommand(command))
144 except Exception as e:
145 logger.exception('Exception in server main event loop running command %s (%s)' % (command, str(e)))
146
147 if self.xmlrpc in ready:
148 self.xmlrpc.handle_requests()
149 if self.sock in ready: 136 if self.sock in ready:
150 self.controllersock, address = self.sock.accept() 137 self.controllersock, address = self.sock.accept()
151 if self.haveui: 138 if self.haveui:
@@ -194,6 +181,24 @@ class ProcessServer(multiprocessing.Process):
194 print("Server timeout, exiting.") 181 print("Server timeout, exiting.")
195 self.quit = True 182 self.quit = True
196 183
184 if self.command_channel in ready:
185 try:
186 command = self.command_channel.get()
187 except EOFError:
188 # Client connection shutting down
189 continue
190 if command[0] == "terminateServer":
191 self.quit = True
192 continue
193 try:
194 print("Running command %s" % command)
195 self.command_channel_reply.send(self.cooker.command.runCommand(command))
196 except Exception as e:
197 logger.exception('Exception in server main event loop running command %s (%s)' % (command, str(e)))
198
199 if self.xmlrpc in ready:
200 self.xmlrpc.handle_requests()
201
197 ready = self.idle_commands(.1, fds) 202 ready = self.idle_commands(.1, fds)
198 203
199 print("Exiting") 204 print("Exiting")