18 February 2013

Using Posix Threads in Mac OS X

Got into an EMFILE error
Too many semaphore descriptors or file descriptors are currently in use by this process.
when trying to run a program which runs on Ubuntu well.
The problem is that apparently Mac creates a file for every semaphore, and there's a limit for the number of opened files at one time, and it's set very low for Mac...
This can be fixed by
ulimit -n 10000
do not use sudo.

No comments:

Post a Comment