Olivier Galibert <galibert(a)pobox.com> writes:
Signal handling is a fragile mix of system and libc state. If
the
system thinks that a signal (say SIGFPE) isn't handled while the libc
thinks it is (after starting a dumped executable that was handling it)
I don't really know what will happen.
Right. Dumping sucks in many ways. There's plenty of confusion in
the source too.
In emacs.c:
/****** Now initialize everything *******/
/* First, do really basic environment initialization -- catching signals
and the like. These functions have no dependence on any part of
the Lisp engine and need to be done both at dump time and at run time. */
init_signals_very_early ();
...
In signal.c:
void
init_signals_very_early (void)
{
/* Catch all signals that would kill us.
Don't catch these signals in batch mode if not initialized.
On some machines, this sets static data that would make
signal fail to work right when the dumped Emacs is run. */
if (noninteractive && !initialized)
return;
handle_signal_if_fatal (SIGILL); /* ANSI */
handle_signal_if_fatal (SIGABRT); /* ANSI */
...