On the occasion of upgrading to the fabled "Tiger" (OS X 10.4 10.4.1 10.4.2 (8C46), I find that Terminal version 1.5 (build 133) sometimes fails to attach a shell to a newly created term window. To start with it mostly alternated success and failure:
Those were all freshly created. The alternation was not entirely consistent; sometimes several would succeed or fail in a row. While setting up for this screenshot I had to delete an entire screenful of windows which opened successfully and only began failing when fork() maxed out, but that was anamolous. The situation shown in the screenshot was much more typical.
After several OS updates and various poorly-documented fiddling (most notably with Noam's cute little C script that was supposed to let us monitor which processes were failing when), the failure rate has dropped and is now low enough that I have difficulty tracking the patterns of possible failure triggers. I'm hoping to have a little fun with ktrace soon and nail it down better.
But the fun doesn't stop here! Terminal has trouble closing things properly when they exit, too. If I open a bunch of terminals, then close all but one of them with command-w and run a $(w), I see a bunch of orphaned shells roughly equal in number to the number of windows I opened and closed. Not exactly equivalent, mind you. That would be too easy. The workaround is to remember to exit every shell instance with $(exit) before closing the terminal.
Vruba reports that same issues running zsh in both Terminal and iterm 0.8.0.
I'm including my config files below for completeness. I don't think they're affecting the issue, but I don't want to send anyone into a tizzy over something that's really my problem. As you can see, I'm straddling the fence on the issue of where to store which settings.
If anyone knows how I can fix this, please tell me. I'm sending this to Apple, as well. I hope that by the time most of you read this, it's of nothing but historical interest.