From b38c3fe8632ec0ee4f180dae2938959bd8b4c46e Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sun, 17 Apr 2022 15:00:00 +0200 Subject: [PATCH] Check whether we can restart in Fkill_emacs * src/emacs.c (Fkill_emacs): Report an error if we can't restart. --- src/emacs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/emacs.c b/src/emacs.c index 50b1628d207..173e8e8923d 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -2807,7 +2807,8 @@ killed. */ if (!NILP (restart)) { - execvp (*initial_argv, initial_argv); + if (execvp (*initial_argv, initial_argv) < 1) + error ("Unable to re-execute Emacs"); } if (FIXNUMP (arg)) -- 2.39.2