vi alarm signals

Paul Fox pgf at brightstareng.com
Wed Mar 12 13:12:27 UTC 2008


thinking about this some more -- given that hitting ^C has exactly
the same effect as this alarm going off, i can think of no reason
to keep it around at all.  i will simply remove the code unless i
hear otherwise in the next couple of days.

paul

i wrote:
 > it seems that vi contains a software watchdog of sorts.
 > 
 > the intent is that if a vi command runs too long, a SIGALRM
 > will be generated, and the result will be much as if the user
 > hit ^C -- the operation will be aborted, and the editor will go
 > back to waiting for input.
 > 
 > now, i don't quite know why this was implemented, but:
 >     a) the current timeout is 3 seconds.  this feels too short,
 > 	especially when you're searching for a string in a long
 > 	file.
 >     b) currently, the alarm signal isn't even caught, so when the
 > 	timer expires, the editor just dies.  there's a comment in
 > 	the code that implies this wasn't always the case, so i
 > 	assume it's a recent bug.
 > 
 > what should i do?
 > 
 > the obvious minimal change is simply to lengthen the timer, to
 > something more reasonable than 3 seconds.  the signal should also
 > be caught correctly.
 > 
 > but, should i simply delete this code?  make it configurable?  put
 > it inside a developer-only ifdef of some sort?
 > 
 > paul

=---------------------
 paul fox, pgf at brightstareng.com



More information about the busybox mailing list