Subject: Re: bug#56528: 29.0.50; Emacs lucid segfaults when X dies

From: Eli Zaretskii <[email-masked]>
Date: Thu, 14 Jul 2022 08:36:29 +0300

> From: Po Lu <[email-masked]>
> Cc: Visuwesh <[email-masked]>,  [email-masked]
> Date: Thu, 14 Jul 2022 08:39:23 +0800
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > Btw, what do we expect Emacs to do in this scenario?  If the X server
> > is killed, Emacs cannot display anything, so why an abort is not TRT?
> > What practically interesting use case does this emulate?
> 
> It should just print an error message and die with a specific exit code,
> without printing a giant backtrace to stdout.

Print an error message where?

> Would binding `inhibit-redisplay' around the call to Fkill_emacs be a
> reasonable solution?

No, because that's not what inhibit-redisplay is for.

I think the right solution for this use case is to add a new command
that deletes all client frames.  We are talking about a user who
intentionally kills the X server, so the ability to conveniently
delete all the frames except the daemon frame will (or should) allow
Emacs to survive the traumatic event.