Interesting bug in the CLI?

zpincus

Registered
Here's an interesting problem I've found:

From the terminal (or other CLI login) run ftp.
Now suspend it with ^-Z.
Every time you press return from now on, you should be appraised of the fact that ftp is in fact suspended (abnormal).
Now, try to resume it with fg.
ftp no longer responds. ^-Z , ^-C, et. al. don't work.
In fact the only way to regain control over the shell is to open a new terminal window and kill -9 the offending ftp process. (yes, kill -9. kill -HUP and kill by itself don't work.)

Lynx is also prone to this problem, but I can't make it appear as regularly as with ftp. (I think you have to suspend lynx, then bg it, then fg it and it hangs...) So I don't think the problem is in ftp or lynx themselves, but maybe in some library they use? maybe curses?

Since I'm away from my OS X box and ssh is somehow broken, I can't check if this bug only shows up in tcsh, or if it affects other shells too...

Has anyone else noticed this or knows anything about this?

Zach
(Yes, I've reported it to apple...)
 

scruffy

Notorious Olive Counter
Hmm. Interesting, indeed.

Maybe it has something to do with terminal modes (cooked/raw/cbreak) (don\'t ask me, it was right near the end of my Unix class, has to do with how input/ouput are passed to the program/terminal). Pico also behaves that way (like lynx: ^Z - bg - fg for a freeze). Actually, I sent a kill -9 to pico, and it logged me out of the terminal as well...
 
Top