summaryrefslogtreecommitdiff
path: root/src/buildstream/_platform/darwin.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildstream/_platform/darwin.py')
-rw-r--r--src/buildstream/_platform/darwin.py24
1 files changed, 0 insertions, 24 deletions
diff --git a/src/buildstream/_platform/darwin.py b/src/buildstream/_platform/darwin.py
index fc9be342f..00bca2c4c 100644
--- a/src/buildstream/_platform/darwin.py
+++ b/src/buildstream/_platform/darwin.py
@@ -15,36 +15,12 @@
# You should have received a copy of the GNU Lesser General Public
# License along with this library. If not, see <http://www.gnu.org/licenses/>.
-import resource
-
from ..sandbox import SandboxDummy
from .platform import Platform
class Darwin(Platform):
-
- # This value comes from OPEN_MAX in syslimits.h
- OPEN_MAX = 10240
-
- def maximize_open_file_limit(self):
- # Note that on Mac OSX, you may not be able to simply set the soft
- # limit to the reported hard limit, as it may not be the only limit in
- # effect. The output of these commands may be somewhat independent:
- #
- # $ launchctl limit
- # $ sysctl -a | grep files
- #
- # The OPEN_MAX value from syslimits.h seems to be fairly safe, although
- # users may tweak their individual systems to have different values.
- # Without a way to determine what the real limit is, we risk failing to
- # increase the limit. Perhaps the complication is why psutil does not
- # support rlimit on Mac.
- #
- old_soft_limit, hard_limit = resource.getrlimit(resource.RLIMIT_NOFILE)
- soft_limit = min(max(self.OPEN_MAX, old_soft_limit), hard_limit)
- resource.setrlimit(resource.RLIMIT_NOFILE, (soft_limit, hard_limit))
-
@staticmethod
def _check_dummy_sandbox_config(config):
pass