projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ec025f2
)
Add a `restart-emacs' sanity check
author
Lars Ingebrigtsen
<larsi@gnus.org>
Sun, 17 Apr 2022 13:46:24 +0000
(15:46 +0200)
committer
Lars Ingebrigtsen
<larsi@gnus.org>
Sun, 17 Apr 2022 13:46:32 +0000
(15:46 +0200)
* src/emacs.c (Fkill_emacs): Add a sanity check for argv.
src/emacs.c
patch
|
blob
|
history
diff --git
a/src/emacs.c
b/src/emacs.c
index 173e8e8923d6860a609af6bba2763bcd0d906ec9..a16e702ab7b455d1a4ae3a594967ef75e840facc 100644
(file)
--- 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");
}