How to increase the limit of “maximum open files” in C on Mac OS X

后端 未结 6 2057
刺人心
刺人心 2020-12-15 13:04

The default limit for the max open files on Mac OS X is 256 (ulimit -n) and my application needs about 400 file handlers.

I tried to change the limit with setrlimit(

6条回答
  •  爱一瞬间的悲伤
    2020-12-15 13:46

    I know that's sound a silly question, but you really need 400 files opened at the same time? By the way, are you running this code as root are you?

提交回复
热议问题