From e0009409b8cb0ce3810abf879e9e00c915724e47 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Mon, 18 Apr 2022 10:50:45 +0200 Subject: [PATCH] Make "restart" erroring slightly more reliable * src/emacs.c (Fkill_emacs): Use emacs_perror for the "restart" errors -- we've already shut down Emacs at this point, so the normal erroring machinery isn't reliable. --- src/emacs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/emacs.c b/src/emacs.c index fd79963ed9c..6ef19561e0b 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -2818,13 +2818,13 @@ killed. */ /* This is very unlikely, but it's possible to execute a binary (on some systems) with no argv. */ if (initial_argc < 1) - error ("No command line arguments known; unable to re-execute Emacs"); + emacs_perror ("No command line arguments known; unable to re-execute Emacs"); #ifdef WINDOWSNT if (w32_reexec_emacs (initial_cmdline, initial_wd) < 0) #else if (execvp (*initial_argv, initial_argv) < 1) #endif - error ("Unable to re-execute Emacs"); + emacs_perror ("Unable to re-execute Emacs"); } if (FIXNUMP (arg)) -- 2.39.2