summaryrefslogtreecommitdiffstats
path: root/bitbake/bin/bitbake-worker
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-08 23:32:07 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-09 14:27:56 +0100
commit85256c8fa986f2a3258e75a22bb8d0656ffa41bf (patch)
treecb8626540c327fcd1c59c248ac8038a4a4b5b592 /bitbake/bin/bitbake-worker
parent289007e5ebd82e7cf61a20c6afd0206e0037ce0d (diff)
downloadpoky-85256c8fa986f2a3258e75a22bb8d0656ffa41bf.tar.gz
bitbake: prserv: SIGTERM and deamonization fixes
Worryingly, if you SIGKILL the bitbake cooker, an autostarted PR server will remain behind. It turns out there are a few things we should do: * The PR service doesn't need to daemonize when started from cooker, it just complicated the process lifecycle. Add a fork() method to handle this and use the non-daemon mode for the singleton. * Reset the sigterm and sigint handlers. Bitbake cooker installs its own which we inherit meaning PR server was ignoring SIGTERM. Installing our own handlers which include a sync makes most sense here. Since we're in the code, make it sync the database on SIGINT. * Use the new bb.utils.signal_on_parent_exit() call so that we get a SIGTERM when the parent (usually cooker) exits and we can shutdown too. Alternatives would be having an open pipe or polling os.getppid() for changes but this seems more effective. (Bitbake rev: 05d31fa1f56bd3d3d363a16a421d9ba7541d4293) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/bin/bitbake-worker')
0 files changed, 0 insertions, 0 deletions