Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've seen other questions covering the topic of how to set the file limit on Leopard/Lion.

For example:

How to properly increase ulimit -n on Lion?
Too Many Open Files

But after reading through those I'm still not clear on how I would set the open file limit for my instance of emacs. Can anyone explain that to me?

It seems to me that ulimit -n sets the limit for the current shell. That won't work for emacs, because emacs is not a shell. Also, apparently launching emacs from the shell would allow the ulimit -n value for the shell to apply to emacs. But I would like to not invoke emacs from a shell; I'd like to just click the pretty icon.

Also there are some other ways to modify the open file limit but I am not clear on exactly where those limits apply. At least one of the limits applies to "all open files on the operating system" and for my purposes that is much too broad a brush.

I want to know how to set the file limit for a specific app. Chrome, Emacs, or whatever. In my particular case, I am interested in emacs but I guess it would be a generic solution.


[I tried tagging this with ulimit but could not, because I am at 101 rep right now]

share|improve this question


enter image description here


sudo vi /etc/launchd.conf


limit maxproc   100000  200000
limit maxfiles  100000  200000


enter image description here

share|improve this answer
Can you please verify the link to the "after" screenshot? Or just add the result as text (cut&paste from Terminal)? – patrix Aug 15 '12 at 8:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.