+h_alrm(int signo)
+{
+ GLOBAL_CLP;
+
+ F_SET(clp, CL_SIGALRM);
F_SET is |=, which is not atomic.
This is unsafe. Safe signal handlers need to make single stores to
atomic-sized variables, which tend to be int-sized, easier to declare
as sig_atomic_t. Most often these are global
I've switched this to using alarm(3) instead of setitimer(2) which is a
little simpler in the code but most of the changes are just vi event
handling boilderplate. There is very little new functional code.
Original investigation write-up follows. Have had quite a bit of user
feedback and
trondd wrote:
> trondd wrote:
>
> > trondd wrote:
> >
> > >
> > > While investigating an occasional crash when recovering a file with 'vi
> > > -r'
> > > after a power failure, I noticed that the recovery files are actually
> > > never
> > > updated during an editing session. The
trondd wrote:
> trondd wrote:
>
> >
> > While investigating an occasional crash when recovering a file with 'vi -r'
> > after a power failure, I noticed that the recovery files are actually never
> > updated during an editing session. The recovery files are created upon
> > initial
trondd wrote:
>
> While investigating an occasional crash when recovering a file with 'vi -r'
> after a power failure, I noticed that the recovery files are actually never
> updated during an editing session. The recovery files are created upon
> initial modification of the file which saves
While investigating an occasional crash when recovering a file with 'vi -r'
after a power failure, I noticed that the recovery files are actually never
updated during an editing session. The recovery files are created upon
initial modification of the file which saves the state of the file at