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

There is not any ulimit configuration in system startup files/ shell startup scripts.

ulimit -a shows:

-u: processes                       1064
-n: file descriptors                256

launchctl limit shows:

maxproc     2048           2048           
maxfiles    2048           2048

I vaguely remember that launchctl's limits should match with a shell's ulimit output, I might be wrong.

Is there any relationship between the lauchctl's limits and ulimit?

share|improve this question
Do you not get satisfactory answers from the commands' man page? – Andrew U. Jan 10 '14 at 8:11
@AndrewU. launchctl manual page does not mention limit, ulimit manual page does not mention launchctl or launchd. – Howard Jan 10 '14 at 8:47
up vote 3 down vote accepted

In the shell, ulimit provides "control over the resources available to the shell and to processes started by it" (see man bash). Therefore, it applies only to the shell and its children. The limits for launchd are related to it and the processes that it manages. The two are separate.

Individual programs can set their own resource limits by calling the Standard C Library routines ulimit() or getrlimit() and setrlimit(). Certain resource limits cannot be elevated unless the process is running as the super-user.

As a practical example, I debug large software projects and the shell's default limit for the number of open files isn't big enough. In my .bashrc file, I have the following:

# Increase the upper limit on the number of open files:
ulimit -n 1024

Now my debugger won't complain that it can't open all the files it needs. Obviously, this should have no impact on launchd.

share|improve this answer
To elaborate on that: default ulimit settings are derived from launchctl limit; although user may change ulimit numbers, however they may not exceed launchctl limit hard limits. – Howard Jan 15 '14 at 18:07
this will be reset on reboot – engineerDave Apr 17 '15 at 15:24

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.