cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject [2/2] git commit: [CB-3735] Detect and fix low ulimit.
Date Thu, 20 Jun 2013 18:25:48 GMT
[CB-3735] Detect and fix low ulimit.


Project: http://git-wip-us.apache.org/repos/asf/cordova-coho/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-coho/commit/e7189fca
Tree: http://git-wip-us.apache.org/repos/asf/cordova-coho/tree/e7189fca
Diff: http://git-wip-us.apache.org/repos/asf/cordova-coho/diff/e7189fca

Branch: refs/heads/master
Commit: e7189fca5a39764c09d14b3716bb3d804e0532d8
Parents: 9da2774
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Thu Jun 20 14:25:13 2013 -0400
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Thu Jun 20 14:25:13 2013 -0400

----------------------------------------------------------------------
 coho | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-coho/blob/e7189fca/coho
----------------------------------------------------------------------
diff --git a/coho b/coho
index c9a15aa..75f002a 100755
--- a/coho
+++ b/coho
@@ -1035,6 +1035,13 @@ function main() {
             }
         }).argv;
 
+    // ShellJS opens a lot of file handles, and the default on OS X is too small.
+    var ulimit = execHelper('ulimit -S -n', true, true);
+    if (ulimit && ulimit < 2000) {
+        execHelper('/bin/bash -c \'ulimit -S -n 4096; exec "' + process.argv[0] + '" "' +
process.argv.slice(1).join('" "') + '" --ulimit\'');
+        return;
+    }
+
     commandMap[command].entryPoint();
 }
 main();


Mime
View raw message