vi alarm signals

Paul Fox pgf at brightstareng.com
Mon Mar 10 21:54:35 UTC 2008


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