Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Revisiting Terminal.app's [Process completed] bug UNIX
After reinstalling my iBook from scratch this weekend, I started suffering (occasionally) from the old [Process completed] bug, as mentioned in this earlier hint.

Unfortunately, all the suggested fixes seem to be failing for me, including an upgrade to a newer zsh. As a user of zsh for the past ten years or so, I'm certainly not going to change shells, which made me think of this approach. It also gives me the joy of abusing both csh and dtterm at the same time. The principle is to use csh to bootstrap zsh, utilizing an obscure terminal type to signal csh to do so. At the command prompt (if you can get one -- I was having this problem only occasionally), execute:
    echo 'if ($TERM == dtterm) then' >> ~/.cshrc
    echo '    set term=xterm-color' >> ~/.cshrc
    echo '    exec zsh' >> ~/.cshrc
    echo 'endif' >> ~/.cshrc
Then in Terminal Preferences, set "Execute the command (specify complete path)" to /bin/csh -l and "Declare terminal type ($TERM) as" to dtterm.

Of course, if you're unfortunate enough to have to still use dtterm emulation at any time, you'll have to substitute one of the other predefined terminal types.
    •    
  • Currently 2.00 / 5
  You rated: 4 / 5 (4 votes cast)
 
[8,773 views]  

Revisiting Terminal.app's [Process completed] bug | 6 comments | Create New Account
Click here to return to the 'Revisiting Terminal.app's [Process completed] bug' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Revisiting Terminal.app's [Process completed] bug
Authored by: gshenaut on Mar 10, '06 09:23:43AM

Why are you doing four echo commands redirected to .cshrc? Even if you don't want to use vi(1), you could use textedit to type in whatever commands you want, just make sure that you save the file as straight text and with no .txt suffix (in spite of textedit's squawking).

Greg Shenaut



[ Reply to This | # ]
Revisiting Terminal.app's [Process completed] bug
Authored by: gid on Mar 15, '06 01:23:32AM

For multiple macs, I found it simpler to cut-n-paste into Terminal from iChat (Cmd-N, Cmd-V, Cmd-W) rather than transfer the file around or having to start an editor: even vi.



[ Reply to This | # ]
Revisiting Terminal.app's [Process completed] bug
Authored by: SethTisue on Mar 10, '06 10:07:11AM

For a long time I had this same problem.

I tried upgrading to a newer zsh like many people suggested, but it didn't seem to fix the problem.

Eventually I figured out why it worked for other people and didn't work for me.

Here's what's going on. There is some kind of a bug in the old zsh that when you exit the shell, leaves the tty device you were using in some kind of damaged state. When you try to start a new zsh on that tty, it won't start.

Upgrading to a new zsh fixes the bug that damages the ttys, but even the new zsh won't start on a damaged tty. Seeing that the bug still seems to be present, you go back to the old zsh, discouraged.

The key is to stick with the new zsh. Every time it fails to start, one of your old damaged ttys becomes fixed. Eventually they will all be fixed and you will never have a problem again.

I've duplicated this on three or four different Macs -- same story on all of them. Upgrade zsh (using fink or whatever -- compile it yourself if you want), switch to the new binary, and stick with it!



[ Reply to This | # ]
Revisiting Terminal.app's [Process completed] bug
Authored by: gid on Mar 15, '06 12:58:29AM

Unfortunately, the new zsh didn't seem to work for me. I compiled 4.3.2 from source, expecting it to solve the problem (as it has for me before), and it still happened occasionally.

As far as I can tell, the fault isn't with zsh per se, as bash also suffers from the same problem: it seems to be a problem with "login" and the allocation of ttys. As a result, this solution gets round it by making the zsh NOT a login shell as such.



[ Reply to This | # ]
Revisiting Terminal.app's [Process completed] bug
Authored by: gid on Mar 15, '06 01:05:45AM

Sorry, SethTisue, I just reread your comment, and realised my reply didn't directly answer it. Yes, I tried that too. Or at least, I rebooted (I had pending software updates anyway), and then tapped Cmd-N about twenty times, Cmd-W the same number of times (repeat as needed) to try to trigger the error. That should've cleared up the ttys as you describe, but it didn't work.

For some reason, this recent reinstall of my iBook has had a few quirks... the tenaciousness of this bug being one of them.



[ Reply to This | # ]
Revisiting Terminal.app's [Process completed] bug
Authored by: SethTisue on Mar 17, '06 07:35:22AM

Trying to fix all the tty's at once by tapping Command-N twenty times doesn't work; you'd think it would but in my experience it doesn't necessarily do it. I don't understand why. But that's the first thing I tried too and it doesn't necessarily fix the problem right away. Nonetheless, the bug eventually stopped happening on every Mac I've tried this on. Be patient. DON'T go back to the old zsh, stick with the new one for a while, and I believe that your problem will eventually go away.

Oh, one more thing: how absolutely, completely sure are you that you are actually running the new binary and not the old one? How do you know?

One more thing: I'm actually running 4.2.6, not 4.3. (Apple bundles 4.2.3.) While it seems unlikely that 4.3.2 would have the bug if 4.2.6 doesn't, if you're desperate you could try 4.2.6.



[ Reply to This | # ]