all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: "Eli Zaretskii" <eliz@gnu.org>,
	"Gerd Möllmann" <gerd.moellmann@gmail.com>
Cc: 60220@debbugs.gnu.org, aaronjensen@gmail.com
Subject: bug#60220: 29.0.60; macOS 13.1 crash shortly after starting Emacs
Date: Thu, 22 Dec 2022 18:05:55 -0800	[thread overview]
Message-ID: <dd474f0f-0b72-b9e0-6017-797ae801e1da@cs.ucla.edu> (raw)
In-Reply-To: <831qoram2m.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 406 bytes --]

On 12/22/22 00:18, Eli Zaretskii wrote:
> Paul, could you perhaps audit the code which implements restart-emacs,
> and see if we need to make it safer, in particular wrt signals and
> *.eln files loaded via dynlib.

I don't offhand see why anything would need to be done other than turn 
off timer signals to the execed process. Something like the attached 
patch, perhaps. Aaron, could you give it a try?

[-- Attachment #2: 0001-Fix-restart-emacs-alarms-Bug-60220.patch --]
[-- Type: text/x-patch, Size: 824 bytes --]

From 175a4a27dcb17a80d9e8e82344ad3bef47822350 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Thu, 22 Dec 2022 18:01:08 -0800
Subject: [PATCH] Fix restart-emacs alarms (Bug#60220).
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* src/emacs.c (Fkill_emacs): Turn timers off before execing,
so that the re-execed Emacs doesn’t get a timer alarm.
---
 src/emacs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/emacs.c b/src/emacs.c
index d8a2863fd9..a2ba4b50f0 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -2910,6 +2910,7 @@ DEFUN ("kill-emacs", Fkill_emacs, Skill_emacs, 0, 2, "P",
 
   if (!NILP (restart))
     {
+      turn_on_atimers (false);
 #ifdef WINDOWSNT
       if (w32_reexec_emacs (initial_cmdline, initial_wd) < 0)
 #else
-- 
2.38.1


  reply	other threads:[~2022-12-23  2:05 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-20 15:11 bug#60220: 29.0.60; macOS 13.1 crash shortly after starting Emacs Aaron Jensen
2022-12-20 15:25 ` Aaron Jensen
2022-12-20 15:41   ` Eli Zaretskii
2022-12-20 15:59     ` Aaron Jensen
2022-12-20 17:23       ` Eli Zaretskii
2022-12-21  3:47         ` Aaron Jensen
2022-12-21 12:22           ` Eli Zaretskii
2022-12-21 13:29             ` Gerd Möllmann
2022-12-22  5:09               ` Aaron Jensen
2022-12-22  5:12                 ` Aaron Jensen
2022-12-22  5:36                   ` Gerd Möllmann
2022-12-22  8:18                     ` Eli Zaretskii
2022-12-23  2:05                       ` Paul Eggert [this message]
2022-12-23  2:22                         ` Aaron Jensen
2022-12-23  5:33                           ` Gerd Möllmann
2022-12-23  5:56                           ` Paul Eggert
2022-12-24  6:45                             ` Aaron Jensen
2022-12-24  6:57                               ` Eli Zaretskii
2022-12-24  7:03                                 ` Aaron Jensen
2022-12-24  8:25                                 ` Paul Eggert
2022-12-24 15:11                             ` Aaron Jensen
2022-12-25  5:30                               ` Gerd Möllmann
2022-12-25 19:30                                 ` Aaron Jensen
2022-12-25 19:59                                   ` Eli Zaretskii
2022-12-27 11:12                                     ` Aaron Jensen
2022-12-27 13:11                                       ` Eli Zaretskii
2022-12-29 22:47                                         ` Aaron Jensen
2022-12-29 23:46                                           ` Aaron Jensen
2022-12-29 23:49                                             ` Paul Eggert
2022-12-29 23:59                                               ` Aaron Jensen
2022-12-30  0:03                                                 ` Aaron Jensen
2022-12-30  1:16                                                   ` Paul Eggert
2022-12-30  1:20                                                     ` Aaron Jensen
2022-12-30  2:11                                                     ` Aaron Jensen
2022-12-30  3:54                                                       ` Aaron Jensen
2022-12-30  4:24                                                         ` Aaron Jensen
2022-12-30  4:25                                                           ` Aaron Jensen
2022-12-30  7:41                                                             ` Gerd Möllmann
2022-12-30  8:03                                                               ` Aaron Jensen
2022-12-30  8:42                                                                 ` Gerd Möllmann
2022-12-30 13:37                                                                   ` Aaron Jensen
2022-12-30 13:52                                                                     ` Aaron Jensen
2022-12-30 14:24                                                                       ` Aaron Jensen
2022-12-30 15:27                                                                       ` Gerd Möllmann
2022-12-30 15:50                                                                         ` Aaron Jensen
2022-12-30  8:37                                                     ` Eli Zaretskii
2022-12-30 13:36                                                       ` Aaron Jensen
2022-12-30 14:18                                                         ` Eli Zaretskii
2022-12-30 22:42                                                       ` Paul Eggert
2022-12-31  6:33                                                         ` Eli Zaretskii
2022-12-30  8:32                                                   ` Eli Zaretskii
2023-01-04 15:51                                                     ` Andrea Corallo
2023-01-04 16:58                                                       ` Eli Zaretskii
2023-01-10 15:28                                                         ` Andrea Corallo
2023-01-10 16:57                                                           ` Eli Zaretskii
2023-01-10 22:59                                                           ` Aaron Jensen
2023-01-12 11:01                                                             ` Andrea Corallo
2023-01-14 16:23                                                               ` Aaron Jensen
2022-12-30  0:08                                                 ` Paul Eggert
2022-12-30  8:29                                               ` Eli Zaretskii
2022-12-22  8:05                   ` Eli Zaretskii
2022-12-20 15:32 ` Eli Zaretskii
2022-12-20 15:36   ` Aaron Jensen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dd474f0f-0b72-b9e0-6017-797ae801e1da@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=60220@debbugs.gnu.org \
    --cc=aaronjensen@gmail.com \
    --cc=eliz@gnu.org \
    --cc=gerd.moellmann@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.