generic-poky/bitbake/lib/bb/server
Richard Purdie 384533bdb4 bitbake: server/process: Handle SIGTERM more gracefully
Currently if you send a SIGTERM to the bitbake UI process, the system basically
hangs if tasks are executing. This is because the server process doesn't
actually try any kind of shutdown before exiting.

This patch trys executing a stateForceShutdown command first, which is
enough to stop any active tasks before the system exits.

I also noticed that terminate can execute multiple times, once at SIGTERM
from the handler and once from the real exit. Double execution leads to
stack traces and potential hangs (writes to dead pipes), so ensure
the code only can run once.

With these fixes, bitbake much more correctly deals with SIGTERM to the
UI process.

(Bitbake rev: 1032ddddbe3241da02ebb3608a1c40f9123b9e80)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-09 14:27:55 +01:00
..
__init__.py bitbake: bitbake: cooker,xmlrpc,servers: implement CookerFeatures 2013-09-22 12:19:43 +01:00
process.py bitbake: server/process: Handle SIGTERM more gracefully 2015-09-09 14:27:55 +01:00
xmlrpc.py bitbake: event/server: Add _uiready flag to handle missing error messages 2015-09-04 16:23:56 +01:00