Close inherited PIPE before doing work
Gmake in Darwin has file descriptor leak.
In a full build, ota_from_target_files will inherits
more than 2000 open PIPEs from gmake and fails in a call to select.select().
This change fixes the build by closing the PIPEs before doing real work.
Change-Id: Ie7035d7add0b1da3afb6bf9c2009d40f8c7d29b3
diff --git a/tools/releasetools/ota_from_target_files b/tools/releasetools/ota_from_target_files
index 79c5465..8f5c3fe 100755
--- a/tools/releasetools/ota_from_target_files
+++ b/tools/releasetools/ota_from_target_files
@@ -807,6 +807,7 @@
if __name__ == '__main__':
try:
+ common.CloseInheritedPipes()
main(sys.argv[1:])
except common.ExternalError, e:
print