Skip to content

Commit

Permalink
closes #485, abort if /proc/sys/fs/file-max is less than 64k
Browse files Browse the repository at this point in the history
  • Loading branch information
devrimyatar committed Oct 5, 2018
1 parent 80dada8 commit a04c00a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@
from ldif import LDIFParser
import copy


file_max = int(open("/proc/sys/fs/file-max").read().strip())

if file_max < 64000:
sys.exit("""
Maximum number of files that can be opened on this computer is less then 64000.
Please increase number of file-max on the host system and re-run setup.py""")

try:
tty_rows, tty_columns = os.popen('stty size', 'r').read().split()
except:
Expand Down

0 comments on commit a04c00a

Please sign in to comment.