From: Eli Zaretskii <eliz@gnu.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: tgbugs@gmail.com, 56002@debbugs.gnu.org
Subject: bug#56002: src/process.c; make-process fails to clean up stderr process on early exit
Date: Mon, 08 Aug 2022 14:57:30 +0300 [thread overview]
Message-ID: <831qtrvtg5.fsf@gnu.org> (raw)
In-Reply-To: <8735e70xwl.fsf@gnus.org> (message from Lars Ingebrigtsen on Mon, 08 Aug 2022 13:36:58 +0200)
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: Eli Zaretskii <eliz@gnu.org>, 56002@debbugs.gnu.org
> Date: Mon, 08 Aug 2022 13:36:58 +0200
>
> Tom Gillespie <tgbugs@gmail.com> writes:
>
> > * src/process.c (Fmake_process): Move the call to create the stderr
> > process as late as possible to avoid having to clean up stderrproc in
> > the event of an error prior to the call to create_process. This change
> > is needed to ensure that when called with :query-stderr t (aka the
> > default behavior prior to the addition of :query-stderr) make-process
> > will not leak the stderr process if a call to make-process fails.
> > Also adds a new keyword argument :query-stderr to control whether to
> > query on exit the stderr process (if one is created). (bug#56002)
>
> I think this makes sense... Eli, any comments?
TBH, I don't understand the rationale well enough. What does it mean
we "leak stderr process"? isn't the stderr process recycled if
make-process fails? Is it just a matter of some simple change in the
control flow, to make sure we always go through the cleanup code
before we return?
In general, I'd prefer not to change timing of what we do in
make-process unless it's really unavoidable. There's a lot of
system-dependent stuff there, and who knows what will that cause on
some platform?
next prev parent reply other threads:[~2022-08-08 11:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-15 22:38 bug#56002: src/process.c; make-process fails to clean up stderr process on early exit Tom Gillespie
2022-06-16 2:28 ` bug#56002: update with an additional example Tom Gillespie
2022-06-16 5:13 ` bug#56002: src/process.c; make-process fails to clean up stderr process on early exit Eli Zaretskii
2022-06-16 6:11 ` Tom Gillespie
2022-06-29 21:17 ` Tom Gillespie
2022-08-07 23:48 ` Tom Gillespie
2022-08-08 11:36 ` Lars Ingebrigtsen
2022-08-08 11:57 ` Eli Zaretskii [this message]
2022-08-08 18:54 ` Tom Gillespie
2022-08-09 11:43 ` Eli Zaretskii
2022-08-09 18:59 ` Tom Gillespie
2022-08-10 18:06 ` Eli Zaretskii
2022-08-11 2:33 ` Tom Gillespie
2022-08-11 6:30 ` Eli Zaretskii
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=831qtrvtg5.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=56002@debbugs.gnu.org \
--cc=larsi@gnus.org \
--cc=tgbugs@gmail.com \
/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 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).