GNU bug report logs -
#56002
src/process.c; make-process fails to clean up stderr process on early exit
Previous Next
Full log
View this message in rfc822 format
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Cc: Eli Zaretskii <eliz <at> gnu.org>, 56002 <at> debbugs.gnu.org
> Date: Mon, 08 Aug 2022 13:36:58 +0200
>
> Tom Gillespie <tgbugs <at> 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?
This bug report was last modified 2 years and 314 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.