Subject: Re: bug#77389: 31.0.50; Restarting Emacs with (kill-emacs ... t) looses noninteractivity

From: Eli Zaretskii <[email-masked]>
Date: Sun, 30 Mar 2025 21:29:16 +0300

> Date: Sun, 30 Mar 2025 19:20:58 +0200
> From:  Jens Schmidt via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
> [ Disclaimer:
> 
>   - This is one of my more exotic bug reports, so I won't argue
>     (at least not much) if you close this as "won't fix".
> 
>   - In particular since an Emacs restart, added by Lars in
>     5be9a9ca, probably has only been meant to be used
>     interactively.
> 
>   - But I do have a valid use case for a non-interactive restart,
>     so I created this bug report ... ]

Please describe your use case.

> Probably Fkill_emacs should call execvp not on the command line
> arguments in initial_argv, which already got modified by main,
> but on a copy of the *real* initial command line arguments as
> they have been passed into main?

Yes.  And on MS-Windows, it already does.