Add a `restart-emacs' sanity check
* src/emacs.c (Fkill_emacs): Add a sanity check for argv.
This commit is contained in:
parent
ec025f22ef
commit
56d5a40794
1 changed files with 4 additions and 0 deletions
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue