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

From: Andrés Ramírez <[email-masked]>
Date: Fri, 15 Jul 2022 16:17:42 +0000

>>>>> "Po" == Po Lu <[email-masked]> writes:
Hi. Po Lu.
My comments below.

[...]

    Po> We install an error handler that performs the following:

    Po>   - Bind `inhibit-redisplay' to t.  - Delete each frame on the
    Po> display that went down.  - Free the display data and delete the
    Po> terminal.  - Kill Emacs if no terminals are left.  - Throw an
    Po> error to get Emacs out of the error handler.

Are You describing the function debug?.
If that is the case. I think that function could give some kind of
notification to the user. How a newbie emacs user could identify if
emacs has segfaulted or if emacs has been killed gracefully by this
function?.

--8<---------------cut here---------------start------------->8---
(find-function 'debug)
--8<---------------cut here---------------end--------------->8---

If there is a way for knowing that. Please let me know. I always run
with 'emacs --daemon'.

    Po> Unfortunately, that doesn't always work reliably, such as here.
    Po> And we're trying to find out why.

That brought to my mind this thread.
--8<---------------cut here---------------start------------->8---
https://lists.gnu.org/archive/html/emacs-devel/2022-04/msg00943.html
--8<---------------cut here---------------end--------------->8---

According to my testing at that time. The debug funct Just executes when
'debug-on-error' is not nil.

Best Regards