git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Johannes Sixt <johannes.sixt@telecom.at>
Cc: gitster@pobox.com, git@vger.kernel.org
Subject: Re: [PATCH 14/14] Use the asyncronous function infrastructure to run the content filter.
Date: Sun, 14 Oct 2007 04:07:18 +0100 (BST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0710140404480.25221@racer.site> (raw)
In-Reply-To: <1192305984-22594-15-git-send-email-johannes.sixt@telecom.at>

Hi,

On Sat, 13 Oct 2007, Johannes Sixt wrote:

>  	status = finish_command(&child_process);
>  	if (status)
> -		error("external filter %s failed %d", cmd, -status);
> +		error("external filter %s failed", params->cmd);

Did you mean to remove the status from the output (it should probably read 
"(exit status %d)" instead of just "%d", but an exit status can help 
identify problems, right?


> -	child_process.pid = fork();
> -	if (child_process.pid < 0) {
> -		error("cannot fork to run external filter %s", cmd);
> -		close(pipe_feed[0]);
> -		close(pipe_feed[1]);
> -		return NULL;
> -	}
> -	if (!child_process.pid) {
> -		close(pipe_feed[0]);
> -		exit(filter_buffer(pipe_feed[1], src, *sizep, cmd));
> -	}
> -	close(pipe_feed[1]);
> +	if (start_async(&async))
> +		return 0;	/* error was already reported */

Please write "return NULL;"

Thanks,
Dscho

  reply	other threads:[~2007-10-14  3:07 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-13 20:06 [PATCH 0/14] fork/exec removal series Johannes Sixt
2007-10-13 20:06 ` [PATCH 01/14] Change git_connect() to return a struct child_process instead of a pid_t Johannes Sixt
2007-10-13 20:06   ` [PATCH 02/14] Use start_command() in git_connect() instead of explicit fork/exec Johannes Sixt
2007-10-13 20:06     ` [PATCH 03/14] Use start_command() to run content filters " Johannes Sixt
2007-10-13 20:06       ` [PATCH 04/14] Use run_command() to spawn external diff programs instead of fork/exec Johannes Sixt
2007-10-13 20:06         ` [PATCH 05/14] Use start_comand() in builtin-fetch-pack.c instead of explicit fork/exec Johannes Sixt
2007-10-13 20:06           ` [PATCH 06/14] Have start_command() create a pipe to read the stderr of the child Johannes Sixt
2007-10-13 20:06             ` [PATCH 07/14] upload-pack: Use start_command() to run pack-objects in create_pack_file() Johannes Sixt
2007-10-13 20:06               ` [PATCH 08/14] Add infrastructure to run a function asynchronously Johannes Sixt
2007-10-13 20:06                 ` [PATCH 09/14] Use the asyncronous function infrastructure in builtin-fetch-pack.c Johannes Sixt
2007-10-13 20:06                   ` [PATCH 10/14] upload-pack: Move the revision walker into a separate function Johannes Sixt
2007-10-13 20:06                     ` [PATCH 11/14] upload-pack: Run rev-list in an asynchronous function Johannes Sixt
2007-10-13 20:06                       ` [PATCH 12/14] t0021-conversion.sh: Test that the clean filter really cleans content Johannes Sixt
2007-10-13 20:06                         ` [PATCH 13/14] Avoid a dup2(2) in apply_filter() - start_command() can do it for us Johannes Sixt
2007-10-13 20:06                           ` [PATCH 14/14] Use the asyncronous function infrastructure to run the content filter Johannes Sixt
2007-10-14  3:07                             ` Johannes Schindelin [this message]
2007-10-14  9:39                               ` Johannes Sixt
2007-10-14 17:14                               ` [PATCH amend " Johannes Sixt
2007-10-14 17:08                 ` [PATCH amend 08/14] Add infrastructure to run a function asynchronously Johannes Sixt
2007-10-14  0:57   ` [PATCH 01/14] Change git_connect() to return a struct child_process instead of a pid_t Johannes Schindelin
2007-10-14  9:40     ` Johannes Sixt
2007-10-14 17:10       ` Johannes Schindelin
2007-10-14  2:11 ` [PATCH 0/14] fork/exec removal series Shawn O. Pearce
2007-10-14  2:50   ` Johannes Schindelin
2007-10-14  2:58     ` Shawn O. Pearce
2007-10-14  7:12       ` Pierre Habouzit
2007-10-14  7:17         ` Pierre Habouzit
2007-10-14  7:28           ` Pierre Habouzit
2007-10-14  9:10             ` Andreas Ericsson
2007-10-14 17:09         ` Johannes Schindelin
  -- strict thread matches above, loose matches on Subject: below --
2007-10-19 19:47 [PATCH 0/14 resend] " Johannes Sixt
2007-10-19 19:47 ` [PATCH 01/14] Change git_connect() to return a struct child_process instead of a pid_t Johannes Sixt
2007-10-19 19:47   ` [PATCH 02/14] Use start_command() in git_connect() instead of explicit fork/exec Johannes Sixt
2007-10-19 19:47     ` [PATCH 03/14] Use start_command() to run content filters " Johannes Sixt
2007-10-19 19:47       ` [PATCH 04/14] Use run_command() to spawn external diff programs instead of fork/exec Johannes Sixt
2007-10-19 19:47         ` [PATCH 05/14] Use start_comand() in builtin-fetch-pack.c instead of explicit fork/exec Johannes Sixt
2007-10-19 19:47           ` [PATCH 06/14] Have start_command() create a pipe to read the stderr of the child Johannes Sixt
2007-10-19 19:47             ` [PATCH 07/14] upload-pack: Use start_command() to run pack-objects in create_pack_file() Johannes Sixt
2007-10-19 19:48               ` [PATCH 08/14] Add infrastructure to run a function asynchronously Johannes Sixt
2007-10-19 19:48                 ` [PATCH 09/14] Use the asyncronous function infrastructure in builtin-fetch-pack.c Johannes Sixt
2007-10-19 19:48                   ` [PATCH 10/14] upload-pack: Move the revision walker into a separate function Johannes Sixt
2007-10-19 19:48                     ` [PATCH 11/14] upload-pack: Run rev-list in an asynchronous function Johannes Sixt
2007-10-19 19:48                       ` [PATCH 12/14] t0021-conversion.sh: Test that the clean filter really cleans content Johannes Sixt
2007-10-19 19:48                         ` [PATCH 13/14] Avoid a dup2(2) in apply_filter() - start_command() can do it for us Johannes Sixt
2007-10-19 19:48                           ` [PATCH 14/14] Use the asyncronous function infrastructure to run the content filter Johannes Sixt

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=Pine.LNX.4.64.0710140404480.25221@racer.site \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=johannes.sixt@telecom.at \
    /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).