From: "Aníbal Limón" <anibal.limon@linux.intel.com>
To: bitbake-devel@lists.openembedded.org
Subject: [PATCH 2/2] tinfoil.py: Add shutdown method.
Date: Fri, 3 Jul 2015 15:40:27 -0500 [thread overview]
Message-ID: <1435956027-26996-2-git-send-email-anibal.limon@linux.intel.com> (raw)
In-Reply-To: <1435956027-26996-1-git-send-email-anibal.limon@linux.intel.com>
When run tinfoil in a loop it causing problems for don't
free resources like OS max fd exception.
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
---
lib/bb/tinfoil.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/lib/bb/tinfoil.py b/lib/bb/tinfoil.py
index 8fc9be3..5025e62 100644
--- a/lib/bb/tinfoil.py
+++ b/lib/bb/tinfoil.py
@@ -28,6 +28,7 @@ import bb.utils
from bb.cooker import state, BBCooker, CookerFeatures
from bb.cookerdata import CookerConfiguration, ConfigParameters
import bb.fetch2
+from bb import BBHandledException
class Tinfoil:
def __init__(self, output=sys.stdout, tracking=False):
@@ -84,6 +85,13 @@ class Tinfoil:
else:
self.parseRecipes()
+ def shutdown(self):
+ try:
+ self.cooker.shutdown()
+ self.cooker.updateCache()
+ except BBHandledException:
+ pass
+
class TinfoilConfigParameters(ConfigParameters):
def __init__(self, **options):
--
1.9.1
next prev parent reply other threads:[~2015-07-03 20:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-03 20:40 [PATCH 1/2] cooker.py: Close lock file and watcher fds when end Aníbal Limón
2015-07-03 20:40 ` Aníbal Limón [this message]
2015-07-07 23:12 ` Richard Purdie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1435956027-26996-2-git-send-email-anibal.limon@linux.intel.com \
--to=anibal.limon@linux.intel.com \
--cc=bitbake-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox