I’m currently trialling the use of MacOS as a primary workstation on my work laptop, I’m probably bit of a power user and MacOS isn’t all that happy with some of the things I throw at it.
Generally my activities tend to involve vast number of terminals – one day I suddenly started getting the following error when trying to create new sessions inside of iTerm2:
Unable to Fork iTerm cannot launch the program for this session.
Turns out I had managed to exhaust the number of tty sessions configured by default in the Darwin kernel (127 max). Thankfully as per this helpful error report it’s generally pretty easy to resolve:
# Change the current value for the running kernel sudo sysctl -w kern.tty.ptmx_max=255 # Add the following to /etc/sysctl.conf to make it permanent: kern.tty.ptmx_max=255
I am liking the fact that although some of what I do is a bit weird for MacOS, at least there is a UNIX underneath it that you can still poke to make things happen :-)