From: Junio C Hamano <gitster@pobox.com>
To: Ben Peart <peartben@gmail.com>
Cc: git@vger.kernel.org, benpeart@microsoft.com,
christian.couder@gmail.com, larsxschneider@gmail.com
Subject: Re: [PATCH v3 7/8] sub-process: move sub-process functions into separate files
Date: Wed, 29 Mar 2017 13:43:08 -0700 [thread overview]
Message-ID: <xmqqmvc3ak6b.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <20170329155330.12860-8-benpeart@microsoft.com> (Ben Peart's message of "Wed, 29 Mar 2017 11:53:29 -0400")
Ben Peart <peartben@gmail.com> writes:
> +Types
> +-----
> +
> +'int(*subprocess_start_fn)(struct subprocess_entry *entry)'::
> +
> + User-supplied function to initialize the sub-process. This is
> + typically used to negoiate the interface version and capabilities.
> +
> +
> +Functions
> +---------
> +
> +`subprocess_start`::
> +
> + Start a subprocess and add it to the subprocess hashmap.
> +
> +`subprocess_stop`::
> +
> + Kill a subprocess and remove it from the subprocess hashmap.
> +
> +`subprocess_find_entry`::
> +
> + Find a subprocess in the subprocess hashmap.
> +
> +`subprocess_get_child_process`::
> +
> + Get the underlying `struct child_process` from a subprocess.
> +
> +`subprocess_read_status`::
> +
> + Helper function to read packets looking for the last "status=<foo>"
> + key/value pair.
OK.
> diff --git a/sub-process.c b/sub-process.c
> new file mode 100644
> index 0000000000..2c4d27c193
> --- /dev/null
> +++ b/sub-process.c
> @@ -0,0 +1,116 @@
> +/*
> + * Generic implementation of background process infrastructure.
> + */
> +#include "sub-process.h"
> +#include "sigchain.h"
> +#include "pkt-line.h"
> + ...
> +void subprocess_exit_handler(struct child_process *process)
> +{
This is not only undocumented in the above, but it does not seem to
be necessary to be a public function. The only thing that uses this
is subprocess_start(), which is in this file. Perhaps make it static?
next prev parent reply other threads:[~2017-03-29 20:47 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-29 15:53 [PATCH v3 0/8] refactor the filter process code into a reusable module Ben Peart
2017-03-29 15:53 ` [PATCH v3 1/8] pkt-line: add packet_writel() and packet_read_line_gently() Ben Peart
2017-03-29 15:53 ` [PATCH v3 2/8] convert: Update convert to use new packet_writel() function Ben Peart
2017-03-29 15:53 ` [PATCH v3 3/8] convert: Split start_multi_file_filter into two separate functions Ben Peart
2017-03-29 15:53 ` [PATCH v3 4/8] convert: Separate generic structures and variables from the filter specific ones Ben Peart
2017-03-29 15:53 ` [PATCH v3 5/8] convert: Update generic functions to only use generic data structures Ben Peart
2017-03-29 15:53 ` [PATCH v3 6/8] convert: rename reusable sub-process functions Ben Peart
2017-03-29 15:53 ` [PATCH v3 7/8] sub-process: move sub-process functions into separate files Ben Peart
2017-03-29 20:43 ` Junio C Hamano [this message]
2017-03-30 15:27 ` Ben Peart
2017-03-29 15:53 ` [PATCH v3 8/8] convert: Update subprocess_read_status to not die on EOF Ben Peart
2017-03-29 19:59 ` [PATCH v3 0/8] refactor the filter process code into a reusable module Junio C Hamano
2017-03-30 15:26 ` Ben Peart
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=xmqqmvc3ak6b.fsf@gitster.mtv.corp.google.com \
--to=gitster@pobox.com \
--cc=benpeart@microsoft.com \
--cc=christian.couder@gmail.com \
--cc=git@vger.kernel.org \
--cc=larsxschneider@gmail.com \
--cc=peartben@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.
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).