Danek Duvall wrote:

> On Fri, Jun 10, 2016 at 07:49:30PM +0200, Bram Moolenaar wrote:
> 
> > Thanks for the stack trace.  I'll make a patch to block autocommands in
> > deathtrap(), that should avoid this crash.  Obviously it won't exit
> > completely cleanly, but that's very difficult to avoid.
> 
> True.  Though in the case of TERM or HUP, things are definitely
> recoverable, at least as compared to things like SEGV.  Still, crashing in
> the middle of cleanup is probably the worst of all worlds.  :)
> 
> > It depends on where the program was when the signal was received.  E.g.,
> > if it happens inside free() then any memory allocation can fail.  And
> > it's difficult to flush swap files without any memory allocation.
> > That's why Vim handles multiple deadly signals.
> 
> Right.  And that's why I went down the road of returning from the signal
> handler to do all those messy things in the normal execution context, but
> then getting out as soon as possible.

Normally you would use CTRL-C to interrupt Vim.  Since it's running in
raw mode that won't generate a signal.  If Vim doesn't see this CTRL-C
then sending a real signal is the only way to interrupt it.  But then
returning from the signal handler won't get to a place where a flag
would be checked, otherwise pressing CTRL-C would have been detected...

-- 
hundred-and-one symptoms of being an internet addict:
90. Instead of calling you to dinner, your spouse sends e-mail.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui