summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
authorAníbal Limón <anibal.limon@linux.intel.com>2017-01-09 10:22:51 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-23 22:38:49 +0000
commit8a3221e6e5a3b90b5099c3db3525b3cb806e3564 (patch)
treeffe32a490ae751c5124a5a7f940dd7af8f696566 /bitbake/lib/bb
parent509d26f95b0d376f8fc7502b8ffd275a33ffa48f (diff)
downloadpoky-8a3221e6e5a3b90b5099c3db3525b3cb806e3564.tar.gz
bitbake: lib/bb/main.py: Shutdown cooker when server isn't foreground
The cooker is added to the BBServer and then detached creating a copy of the cooker in the process, if the server isn't in foreground it cause fd leaks on inotify this can be see using many instances of tinfoil. Example: from bb.tinfoil import Tinfoil while True: with Tinfoil() as tinfoil: input("Pre\n") tinfoil.prepare(config_only=True) input("Post\n") [YOCTO #10873] (Bitbake rev: 2ada2efb057a291eb34c66d975eb339232137956) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
-rwxr-xr-xbitbake/lib/bb/main.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/bitbake/lib/bb/main.py b/bitbake/lib/bb/main.py
index 443f5ec2fd..3ff43cf9ae 100755
--- a/bitbake/lib/bb/main.py
+++ b/bitbake/lib/bb/main.py
@@ -367,6 +367,7 @@ def start_server(servermodule, configParams, configuration, features):
367 raise 367 raise
368 if not configParams.foreground: 368 if not configParams.foreground:
369 server.detach() 369 server.detach()
370 cooker.shutdown()
370 cooker.lock.close() 371 cooker.lock.close()
371 return server 372 return server
372 373