use ulimit command to check process limit in webkitpy
authoraakash_jain@apple.com <aakash_jain@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Mar 2016 23:07:49 +0000 (23:07 +0000)
committeraakash_jain@apple.com <aakash_jain@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Mar 2016 23:07:49 +0000 (23:07 +0000)
https://bugs.webkit.org/show_bug.cgi?id=155260

Reviewed by Alexey Proskuryakov.

* Scripts/webkitpy/port/ios.py:
(IOSSimulatorPort.default_child_processes): Use ulimit command output instead of
launchctl limit maxproc command.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@197891 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/Scripts/webkitpy/port/ios.py

index edc89fd..8ac1f59 100644 (file)
@@ -1,3 +1,14 @@
+2016-03-09  Aakash Jain  <aakash_jain@apple.com>
+
+        use ulimit command to check process limit in webkitpy
+        https://bugs.webkit.org/show_bug.cgi?id=155260
+
+        Reviewed by Alexey Proskuryakov.
+
+        * Scripts/webkitpy/port/ios.py:
+        (IOSSimulatorPort.default_child_processes): Use ulimit command output instead of 
+        launchctl limit maxproc command.
+
 2016-03-09  Alexey Proskuryakov  <ap@apple.com>
 
         Stop building armv7 on iOS device builders
index b0cba3f..b5d7a4a 100644 (file)
@@ -136,7 +136,7 @@ class IOSSimulatorPort(Port):
     def default_child_processes(self):
         """Return the number of Simulators instances to use for this port."""
         best_child_process_count_for_cpu = self._executive.cpu_count() / 2
-        system_process_count_limit = int(subprocess.check_output(["launchctl", "limit", "maxproc"]).strip().split()[1])
+        system_process_count_limit = int(subprocess.check_output(["ulimit", "-u"]).strip())
         current_process_count = len(subprocess.check_output(["ps", "aux"]).strip().split('\n'))
         _log.info('Process limit: %d, current #processes: %d' % (system_process_count_limit, current_process_count))
         maximum_simulator_count_on_this_system = (system_process_count_limit - current_process_count) // self.PROCESS_COUNT_ESTIMATE_PER_SIMULATOR_INSTANCE