From: Eli Zaretskii <eliz@gnu.org>
To: larsi@gnus.org
Cc: rgm@gnu.org, 17036@debbugs.gnu.org, schwab@linux-m68k.org, rrt@sc3d.org
Subject: bug#17036: Continuation for Emacs: invoking a process on exit?
Date: Sun, 17 Apr 2022 15:41:06 +0300 [thread overview]
Message-ID: <83v8v7yja5.fsf@gnu.org> (raw)
In-Reply-To: <83wnfnyjkg.fsf@gnu.org> (message from Eli Zaretskii on Sun, 17 Apr 2022 15:34:55 +0300)
> Resent-From: Eli Zaretskii <eliz@gnu.org>
> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
> Resent-CC: bug-gnu-emacs@gnu.org
> Resent-Sender: help-debbugs@gnu.org
> Date: Sun, 17 Apr 2022 15:34:55 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: rgm@gnu.org, 17036@debbugs.gnu.org, schwab@linux-m68k.org, rrt@sc3d.org
>
> > From: Lars Ingebrigtsen <larsi@gnus.org>
> > Cc: rgm@gnu.org, 17036@debbugs.gnu.org, schwab@linux-m68k.org, rrt@sc3d.org
> > Date: Sun, 17 Apr 2022 14:08:49 +0200
> >
> > Eli Zaretskii <eliz@gnu.org> writes:
> >
> > > As implemented, it won't work reliably on MS-Windows, because execvp
> > > there doesn't do what you think it should. I think we should use
> > > sys_spawnve instead.
> >
> > Ah, I grepped for execvp to see whether we already used it, but didn't
> > notice that the hits were from Gnulib.
> >
> > I'm not familiar with sys_spawnve -- can you do the adjustments?
>
> I don't think I will have the time. It isn't a simple job, because
> just calling sys_spawnve will not do -- that function currently
> supports only Emacs sub-processes.
>
> FTR, I will document below the potential issues with the current
> implementation of kill-emacs/restart-emacs:
>
> . when kill-emacs is called with RESTART non-nil, the value of ARG
> is ignored; this should at least be documented;
> . the exit status of the restarted Emacs is discarded, so it will
> not be available to the parent program, at least on MS-Windows,
> and also if execvp fails for some reason;
> . the semantics of the file descriptors open in the original Emacs
> process is not clear to me: will they remain open in the restarted
> Emacs, if the original Emacs opened them without CLOEXEC?
> . does the restarted Emacs belong to the same process group? should
> it?
> . on MS-Windows, if any of the argv[] command-line arguments have
> embedded whitespace, the restarted Emacs will not get the same
> elements in its argv[] array, because the Windows API for starting
> processes accepts the command-line arguments as a single string
And one more:
. my reading of the code in 'main' is that the argv[] array is
sorted as it is processed, so the restarted Emacs will get the
arguments in a different order (not that it should matter too
much, I think, but still: it isn't exactly the same invocation)
next prev parent reply other threads:[~2022-04-17 12:41 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-18 22:47 bug#17036: Continuation for Emacs: invoking a process on exit? Reuben Thomas
2014-03-18 22:52 ` Andreas Schwab
2014-03-18 22:56 ` Reuben Thomas
2014-03-19 6:27 ` Glenn Morris
2014-03-19 13:10 ` Stefan
2014-03-19 13:19 ` Reuben Thomas
2014-03-19 16:51 ` Eli Zaretskii
2014-03-19 21:14 ` Reuben Thomas
2014-03-20 3:45 ` Eli Zaretskii
2014-03-20 12:02 ` Reuben Thomas
2014-03-20 17:43 ` Eli Zaretskii
2014-03-20 23:10 ` Reuben Thomas
2014-03-21 7:53 ` Eli Zaretskii
2014-03-21 10:09 ` Reuben Thomas
2014-03-21 10:18 ` Reuben Thomas
2014-03-21 10:18 ` Eli Zaretskii
2014-03-21 10:25 ` Reuben Thomas
2022-04-17 11:38 ` Lars Ingebrigtsen
2022-04-17 11:56 ` Reuben Thomas via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-04-17 11:57 ` Eli Zaretskii
2022-04-17 12:08 ` Lars Ingebrigtsen
2022-04-17 12:34 ` Eli Zaretskii
2022-04-17 12:41 ` Eli Zaretskii [this message]
2022-04-17 12:52 ` Lars Ingebrigtsen
2022-04-17 12:49 ` Lars Ingebrigtsen
2022-04-17 14:37 ` Eli Zaretskii
2022-04-17 14:49 ` Lars Ingebrigtsen
2022-04-17 15:51 ` Eli Zaretskii
2022-04-18 8:48 ` Lars Ingebrigtsen
2022-04-18 9:28 ` Eli Zaretskii
2022-04-17 14:29 ` Eli Zaretskii
2022-04-17 15:58 ` Eli Zaretskii
2022-04-17 16:02 ` Lars Ingebrigtsen
2022-04-17 17:49 ` Eli Zaretskii
2022-04-18 8:53 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83v8v7yja5.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=17036@debbugs.gnu.org \
--cc=larsi@gnus.org \
--cc=rgm@gnu.org \
--cc=rrt@sc3d.org \
--cc=schwab@linux-m68k.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.