[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Running atimers when exiting due to a fatal signal

From: Eli Zaretskii
Subject: Running atimers when exiting due to a fatal signal
Date: Mon, 01 Oct 2012 12:12:16 +0200

When we catch a fatal signal, we do this:

  terminate_due_to_signal (int sig, int backtrace_limit)
    signal (sig, SIG_DFL);
    totally_unblock_input ();

And totally_unblock_input has a side effect of calling
do_pending_atimers.  What is the purpose of running atimers when we
caught a fatal signal?  That could result in a nested signal, if some
atimer runs a non-trivial function, couldn't it?  If the result is the
same signal as the one we caught, we will then crash without having a
chance to auto-save in shut_down_emacs.  If that's a different signal,
we get nested signal handling which complicates debugging, if nothing

So running atimers at that time sounds like a bad idea, IMO.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]