git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Beller <sbeller@google.com>
To: "Torsten Bögershausen" <tboegi@web.de>
Cc: Jeff King <peff@peff.net>,
	"git@vger.kernel.org" <git@vger.kernel.org>,
	Jonathan Nieder <jrnieder@gmail.com>,
	Johannes Schindelin <johannes.schindelin@gmail.com>,
	Johannes Sixt <j6t@kdbg.org>
Subject: Re: [PATCHv2] run-command: detect finished children by closed pipe rather than waitpid
Date: Mon, 23 Nov 2015 11:01:12 -0800	[thread overview]
Message-ID: <CAGZ79kYte2-1ddbFOnWL5NFAuK6auLDD2n47Dz+6FcZCpC1vTA@mail.gmail.com> (raw)
In-Reply-To: <CAGZ79kYs9+UTx__yccy6qZY+Xn4onWx3zpH51pzHPn8Hz_FMww@mail.gmail.com>

On Mon, Nov 23, 2015 at 10:44 AM, Stefan Beller <sbeller@google.com> wrote:
> On Fri, Nov 20, 2015 at 10:58 PM, Torsten Bögershausen <tboegi@web.de> wrote:
>> On 2015-11-20 22.08, Stefan Beller wrote:
>> The patch looks good at first glance, one minor remark below:
>>>
>>> diff --git a/run-command.c b/run-command.c
>>
>>> @@ -1071,70 +1089,31 @@ static void pp_output(struct parallel_processes *pp)
>>>
>>>  static int pp_collect_finished(struct parallel_processes *pp)
>>>  {
>>> -     int i = 0;
>>> -     pid_t pid;
>>> -     int wait_status, code;
>>> +     int i, code;
>>
>> code is probably "return code"?
>> woud "ret_value", "res" or "rc" make that more clear ?
>>
>

Although looking through the code, we have lots of functions
having a local `code` variable, so we may want to preserve consistency
across the different functions to have a `code`which contains the return
value of the process or function invoked.

We had the `code` already in pp_collect_finished, so I'd like to not
rename a variable (which was used for the same purpose) in this patch.

In pp_start_one we introduce a new variable `code` which contains
the return from the user callback function, so I would understand if
we were arguing there.

That said, I plan to resend with a reworded commit message later today.

      reply	other threads:[~2015-11-23 19:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-20 21:08 [PATCHv2] run-command: detect finished children by closed pipe rather than waitpid Stefan Beller
2015-11-20 22:05 ` Jonathan Nieder
2015-11-20 23:24   ` Johannes Sixt
2015-11-21  6:58 ` Torsten Bögershausen
2015-11-23 18:44   ` Stefan Beller
2015-11-23 19:01     ` Stefan Beller [this message]

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=CAGZ79kYte2-1ddbFOnWL5NFAuK6auLDD2n47Dz+6FcZCpC1vTA@mail.gmail.com \
    --to=sbeller@google.com \
    --cc=git@vger.kernel.org \
    --cc=j6t@kdbg.org \
    --cc=johannes.schindelin@gmail.com \
    --cc=jrnieder@gmail.com \
    --cc=peff@peff.net \
    --cc=tboegi@web.de \
    /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.
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 NNTP newsgroup(s).