From 8a3221e6e5a3b90b5099c3db3525b3cb806e3564 Mon Sep 17 00:00:00 2001 From: Aníbal Limón Date: Mon, 9 Jan 2017 10:22:51 -0600 Subject: bitbake: lib/bb/main.py: Shutdown cooker when server isn't foreground MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Richard Purdie --- bitbake/lib/bb/main.py | 1 + 1 file changed, 1 insertion(+) (limited to 'bitbake/lib') 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): raise if not configParams.foreground: server.detach() + cooker.shutdown() cooker.lock.close() return server -- cgit v1.2.3-54-g00ecf