1827808 Members
2028 Online
109969 Solutions
New Discussion

Re: Edit file

 
peterchu
Super Advisor

Edit file

We have newly setup a RH Linux and use vi to edit files , but sometimes it will be terminated and pop the below messages , what is the problem then ? thx

Vim: Caught deadly signal
6 REPLIES 6
RAC_1
Honored Contributor

Re: Edit file

What is the signal name??
There is no substitute to HARDWORK
peterchu
Super Advisor

Re: Edit file

"TERM"

is it the TERM settting problem ? thx

Raj D.
Honored Contributor

Re: Edit file

Hi peterchu ,

It seems that your terminal is not set properly , and vi is dropping.

Check with # echo $TERM

Also can do:
# set TERM=vt100
# export TERM
# vi test_file

Any luck,

Cheers ,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Raj D.
Honored Contributor

Re: Edit file

Sorry it should be ,

(Hope you are using bash shell )
# TERM=VT220
# export TERM

Then try # vi test_file

Cheers,
Raj
" If u think u can , If u think u cannot , - You are always Right . "
Raj D.
Honored Contributor

Re: Edit file

Hi Peterchu ,

Also try with setting
# TERM=linux ; export TERM

Cheers,
Raj
" If u think u can , If u think u cannot , - You are always Right . "
Ivan Ferreira
Honored Contributor

Re: Edit file

I saw this on the Internet:

vim 5.3 is badly broken using TERM=linux. After starting it, if I hit
backspace once or twice quickly, it hangs in an infinite loop. Sending it a
signal from another shell prompt causes it to report:
Vim: Caught deadly signal TERM
Vim: Finished.
after which the shell is hosed (because vim didn't reset it when it exited).
Trying TERM=ansi works ok except that the function keys aren't defined.
TERM=xterm works for function keys 5-8, but not 1-4. I eventually made my
own terminal definition based on xterm which properly defines function keys
1-4, too. Could it be that I'm the only one using vim which has this
problem (I didn't see it in the archives)?


So, after you tried the TERM option, ensure that nobody with root privileges is issuing:

killall vi

Or sending kill to your vi process.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?