When I open iTerm, I\'m getting this message:
Last login: Mon Oct 22 12:20:25 on ttys002
-bash: fork: Resource temporarily unavailable
-
To resolve on Yosemite and newer versions of Mac OS, use https://superuser.com/a/838630. I was able to resolve by updating the plist
files and rebooting - the ulimit
commands were unnecessary.
See setting higher limits on the number of processes.
http://blog.ghostinthemachines.com/2010/01/19/mac-os-x-fork-resource-temporarily-unavailable/
bash
- and all the other shells, too - use the fork
system call on Unix systems in order to actually create the process that you want to launch from the shell. In this case, bash
tells you that the system call ended with Resource temporarily unavailable
, which translates to the errno
value of 11, which is equal to EAGAIN
.
The manual page for fork
says that it may set errno
to EAGAIN
when :
RLIMIT_NPROC
resource limit was encountered. To exceed this limit, the process must have either the CAP_SYS_ADMIN
or the CAP_SYS_RESOURCE
capability.In this case, I think that the first reason doesn't really sound realistic, unless you are actually out of memory, so I guess you just must've hit the limit for the number of running processes for your user.
For iTerm, opening a new tab worked for me