Title: [96892] trunk/Source/WebCore
Revision
96892
Author
tha...@chromium.org
Date
2011-10-06 19:43:30 -0700 (Thu, 06 Oct 2011)

Log Message

[chromium] Let rule_binding use os.execvp() instead of subprocess.call() to spawn fewer processes.
https://bugs.webkit.org/show_bug.cgi?id=69589

Reviewed by Adam Barth.

When building with `make -j40`, all the binding rules are built en bloc. Since this script currently
uses subprocess.call(), that actually spawns 80 processes at once. OS X has a max process limit of
255 by default, so the build used to fail with
"open2: fork failed: Resource temporarily unavailable at ../bindings/scripts/preprocessor.pm line 60"
As a fix, use execvp() instead, which replaces the current process instead of spawning a new one.

* WebCore.gyp/scripts/rule_binding.py:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (96891 => 96892)


--- trunk/Source/WebCore/ChangeLog	2011-10-07 02:33:23 UTC (rev 96891)
+++ trunk/Source/WebCore/ChangeLog	2011-10-07 02:43:30 UTC (rev 96892)
@@ -1,3 +1,18 @@
+2011-10-06  Nico Weber  <tha...@chromium.org>
+
+        [chromium] Let rule_binding use os.execvp() instead of subprocess.call() to spawn fewer processes.
+        https://bugs.webkit.org/show_bug.cgi?id=69589
+
+        Reviewed by Adam Barth.
+
+        When building with `make -j40`, all the binding rules are built en bloc. Since this script currently
+        uses subprocess.call(), that actually spawns 80 processes at once. OS X has a max process limit of
+        255 by default, so the build used to fail with
+        "open2: fork failed: Resource temporarily unavailable at ../bindings/scripts/preprocessor.pm line 60"
+        As a fix, use execvp() instead, which replaces the current process instead of spawning a new one.
+
+        * WebCore.gyp/scripts/rule_binding.py:
+
 2011-10-06  Anders Carlsson  <ander...@apple.com>
 
         When building with clang, enable -Wglobal-constructors and -Wexit-time-destructors

Modified: trunk/Source/WebCore/WebCore.gyp/scripts/rule_binding.py (96891 => 96892)


--- trunk/Source/WebCore/WebCore.gyp/scripts/rule_binding.py	2011-10-07 02:33:23 UTC (rev 96891)
+++ trunk/Source/WebCore/WebCore.gyp/scripts/rule_binding.py	2011-10-07 02:43:30 UTC (rev 96892)
@@ -49,7 +49,6 @@
 import os
 import shlex
 import shutil
-import subprocess
 import sys
 
 
@@ -124,13 +123,9 @@
     command.extend(['--outputHeadersDir', hdir])
     command.extend(['--outputDir', cppdir, input])
 
-    # Do it. check_call is new in 2.5, so simulate its behavior with call and
-    # assert.
-    returnCode = subprocess.call(command)
-    assert returnCode == 0
+    # Do it.
+    os.execvp('perl', command)
 
-    return returnCode
 
-
 if __name__ == '__main__':
-    sys.exit(main(sys.argv))
+    main(sys.argv)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to