[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 56d5a40794: Add a `restart-emacs' sanity check
From: |
Lars Ingebrigtsen |
Subject: |
master 56d5a40794: Add a `restart-emacs' sanity check |
Date: |
Sun, 17 Apr 2022 09:46:37 -0400 (EDT) |
branch: master
commit 56d5a4079423aa22d2203a342439df7359eb1c18
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Add a `restart-emacs' sanity check
* src/emacs.c (Fkill_emacs): Add a sanity check for argv.
---
src/emacs.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/emacs.c b/src/emacs.c
index 173e8e8923..a16e702ab7 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -2807,6 +2807,10 @@ killed. */
if (!NILP (restart))
{
+ /* 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");
if (execvp (*initial_argv, initial_argv) < 1)
error ("Unable to re-execute Emacs");
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 56d5a40794: Add a `restart-emacs' sanity check,
Lars Ingebrigtsen <=