* Re: master b38c3fe863: Check whether we can restart in Fkill_emacs
[not found] ` <20220417130021.4C1F4C01684@vcs2.savannah.gnu.org>
@ 2022-04-17 13:36 ` Po Lu
2022-04-17 13:46 ` Lars Ingebrigtsen
0 siblings, 1 reply; 2+ messages in thread
From: Po Lu @ 2022-04-17 13:36 UTC (permalink / raw)
To: emacs-devel; +Cc: Lars Ingebrigtsen
Lars Ingebrigtsen <larsi@gnus.org> writes:
> branch: master
> commit b38c3fe8632ec0ee4f180dae2938959bd8b4c46e
> Author: Lars Ingebrigtsen <larsi@gnus.org>
> Commit: Lars Ingebrigtsen <larsi@gnus.org>
>
> 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 50b1628d20..173e8e8923 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))
What if initial_argc was set to 0? Linux and several other Unix-like
kernels allow executing binaries without any arguments at all.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: master b38c3fe863: Check whether we can restart in Fkill_emacs
2022-04-17 13:36 ` master b38c3fe863: Check whether we can restart in Fkill_emacs Po Lu
@ 2022-04-17 13:46 ` Lars Ingebrigtsen
0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2022-04-17 13:46 UTC (permalink / raw)
To: Po Lu; +Cc: emacs-devel
Po Lu <luangruo@yahoo.com> writes:
> What if initial_argc was set to 0? Linux and several other Unix-like
> kernels allow executing binaries without any arguments at all.
Yes, that's true. I've now added a check.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-04-17 13:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <165020042072.4723.2599255234111162803@vcs2.savannah.gnu.org>
[not found] ` <20220417130021.4C1F4C01684@vcs2.savannah.gnu.org>
2022-04-17 13:36 ` master b38c3fe863: Check whether we can restart in Fkill_emacs Po Lu
2022-04-17 13:46 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).