summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/app.py
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2015-08-05 19:14:03 -0700
committerIvan Alejandro <ivanalejandro0@gmail.com>2015-08-07 19:02:24 -0300
commit154109b9b08a782e2a7f6b6dddbe33e576b2b8a0 (patch)
tree9970bd5837bf3417dc29416c61c9ff3273c57ed8 /src/leap/bitmask/app.py
parent7baaa7689f094c5e82f8b6d2d9bd400a7a102728 (diff)
[bug] raise the maxfiles limit in OSX
due to zmq, we are hitting the limit and getting app crashes. - Resolves: #7319
Diffstat (limited to 'src/leap/bitmask/app.py')
-rw-r--r--src/leap/bitmask/app.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/leap/bitmask/app.py b/src/leap/bitmask/app.py
index 032a9e52..be1fc424 100644
--- a/src/leap/bitmask/app.py
+++ b/src/leap/bitmask/app.py
@@ -39,13 +39,19 @@
# M:::::::::::~NMMM7???7MMMM:::::::::::::::::::::::NMMMI??I7MMMM:::::::::::::M
# M::::::::::::::7MMMMMMM+:::::::::::::::::::::::::::?MMMMMMMZ:::::::::::::::M
# (thanks to: http://www.glassgiant.com/ascii/)
-
import atexit
import commands
import multiprocessing
import os
+import platform
import sys
+if platform.system() == "Darwin":
+ # We need to tune maximum number of files, due to zmq usage
+ # we hit the limit.
+ import resource
+ resource.setrlimit(resource.RLIMIT_NOFILE, (4096, 10240))
+
from leap.bitmask import __version__ as VERSION
from leap.bitmask.backend.backend_proxy import BackendProxy
from leap.bitmask.backend_app import run_backend