[bitbake-devel] [PATCH 2/2] lib/bb/main.py: Shutdown cooker when server isn't foreground

Aníbal Limón anibal.limon at linux.intel.com
Mon Jan 9 16:22:51 UTC 2017


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]

Signed-off-by: Aníbal Limón <anibal.limon at linux.intel.com>
---
 lib/bb/main.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/bb/main.py b/lib/bb/main.py
index 443f5ec..3ff43cf 100755
--- a/lib/bb/main.py
+++ b/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
 
-- 
2.1.4




More information about the bitbake-devel mailing list