git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Max Kirillov <max@max630.net>, peff@peff.net
Cc: Carlo Arenas <carenas@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH] t5562: do not reuse output files
Date: Mon, 26 Nov 2018 11:06:40 +0900	[thread overview]
Message-ID: <xmqqlg5g1tjj.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <20181124130337.GH5348@jessie.local> (Max Kirillov's message of "Sat, 24 Nov 2018 15:03:37 +0200")

Max Kirillov <max@max630.net> writes:

> On Sat, Nov 24, 2018 at 04:47:19PM +0900, Junio C Hamano wrote:
>> I do agree that forcing the parent to wait, like you described in
>> the comment, would be far more preferrable,
>
> It looks like it can be done as simple as:
>
> --- a/http-backend.c
> +++ b/http-backend.c
> @@ -486,6 +486,8 @@ static void run_service(const char **argv, int buffer_input)
>         if (buffer_input || gzipped_request || req_len >= 0)
>                 cld.in = -1;
>         cld.git_cmd = 1;
> +       cld.clean_on_exit = 1;
> +       cld.wait_after_clean = 1;
>         if (start_command(&cld))
>                 exit(1);
>
> at least according to strate it does what it should.

Sounds sane.

I am offhand not sure what the right value of wait_after_clean for
this codepath be, though.  46df6906 ("execv_dashed_external: wait
for child on signal death", 2017-01-06) made this non-default but
turned it on for dashed externals (especially to help the case where
they spawn a pager), as the parent has nothing other than to wait
for the child to exit in that codepath.  Does the same reasoning
apply here, too?

This is a meta point, but I wonder if there is an easy way to "grep"
for uses of run-command interface that do *not* set clean_on_exit.
The pager that can outlive us long after we exit, kept alive while
the user views our output, is an example cited by afe19ff7
("run-command: optionally kill children on exit", 2012-01-07), and
while I am wondering if the default should hae been to kill the
children instead, such a "grep" would have been very useful to know
what codepaths would be affected if we flipped the default.

  parent reply	other threads:[~2018-11-26  2:06 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-19 10:15 [PATCH] t5562: skip if NO_CURL is enabled Carlo Marcelo Arenas Belón
2018-11-19 10:42 ` Ævar Arnfjörð Bjarmason
2018-11-19 18:40 ` Max Kirillov
2018-11-19 19:36   ` Carlo Arenas
2018-11-19 21:26     ` Max Kirillov
2018-11-19 21:39       ` Jeff King
2018-11-22 23:38         ` [PATCH] t5562: fix perl path Max Kirillov
2018-11-23 14:31           ` Carlo Arenas
2018-11-24 12:10           ` Jeff King
2018-11-20  9:11     ` [PATCH] t5562: skip if NO_CURL is enabled Jeff King
2018-11-21 12:02       ` Carlo Arenas
2018-11-21 22:49         ` Max Kirillov
2018-11-21 23:36           ` Carlo Arenas
2018-11-22  1:04           ` Carlo Arenas
2018-11-22  6:37             ` Max Kirillov
2018-11-22 10:17               ` Carlo Arenas
2018-11-22 16:17                 ` Jeff King
2018-11-22 23:43                   ` Max Kirillov
2018-11-23 12:57                     ` Carlo Arenas
2018-11-24  7:04                       ` [PATCH] t5562: do not reuse output files Max Kirillov
2018-11-24  7:34                         ` Junio C Hamano
2018-11-24  7:47                           ` Junio C Hamano
2018-11-24  7:58                             ` Max Kirillov
2018-11-24  9:37                             ` [PATCH v3] " Max Kirillov
2018-11-24 12:14                             ` [PATCH] " Jeff King
2018-11-24 13:03                             ` Max Kirillov
2018-11-24 13:48                               ` [PATCH] http-backend: enable cleaning up forked upload/receive-pack on exit Max Kirillov
2018-11-26  2:10                                 ` Junio C Hamano
2018-11-26  2:06                               ` Junio C Hamano [this message]
2018-11-28  4:17                                 ` [PATCH] t5562: do not reuse output files Max Kirillov
2018-11-24  7:52                           ` [PATCH v2] " Max Kirillov
2018-11-28 14:56                   ` [PATCH] t5562: skip if NO_CURL is enabled Ævar Arnfjörð Bjarmason
2018-12-01 19:53                     ` Jeff King
2018-11-28 13:27       ` SZEDER Gábor
2018-12-01 19:50         ` Jeff King

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: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqlg5g1tjj.fsf@gitster-ct.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=carenas@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=max@max630.net \
    --cc=peff@peff.net \
    /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://80x24.org/mirrors/git.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).