Terminal.app hangs at startup

(Cross-posted from Bottled Text.)

I just got bit by this bug, under OS X 10.5.4. The symptoms are that sudo hangs, and Terminal.app hangs when opening a new tab or when starting up. Console.app shows messages of the form

7/24/08 7:04:44 AM kernel devfs: ttys001: name slot allocation failed (Errno=17)

rprr posted a workaround in the above thread which worked for me. I don't know how to link to specific messages in the discussion thread (or whether that's even allowed under the terms of use, egad), so here's a recap:

1. Started Terminal. It hung up. Did Force Quit and Sent Crash report to Apple. 2. Since I had a working X11 application, I used it to open about 10 xterms using the Applications->Terminal Menu of X11.app 3. I started Terminal again. Now it works.