git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Junio C Hamano <junkio@cox.net>, Git Mailing List <git@vger.kernel.org>
Subject: Re: git-upload-pack: the timeout gets corrupted?!
Date: Sun, 11 Mar 2007 09:01:46 -0700	[thread overview]
Message-ID: <45F427EA.8000905@zytor.com> (raw)
In-Reply-To: <Pine.LNX.4.63.0703111314150.22628@wbgn013.biozentrum.uni-wuerzburg.de>

Johannes Schindelin wrote:
> 
> Something like this (totally untested):
> 
>  upload-pack.c |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/upload-pack.c b/upload-pack.c
> index 498bf50..bafd90f 100644
> --- a/upload-pack.c
> +++ b/upload-pack.c
> @@ -119,6 +119,8 @@ static void create_pack_file(void)
>  		int i;
>  		struct rev_info revs;
>  
> +		close(0);
> +
>  		pack_pipe = fdopen(lp_pipe[1], "w");
>  
>  		if (create_full_pack)

Shouldn't that be close(lp_pipe[0]);?

> @@ -167,6 +169,10 @@ static void create_pack_file(void)
>  		const char *argv[10];
>  		int i = 0;
>  
> +		close(0);
> +		close(1);
> +		close(2);
> +
>  		dup2(lp_pipe[0], 0);
>  		dup2(pu_pipe[1], 1);
>  		dup2(pe_pipe[1], 2);
> 

Those close()'s are redundant with the dup2's...

	-hpa

  reply	other threads:[~2007-03-11 16:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-11  1:45 git-upload-pack: the timeout gets corrupted?! H. Peter Anvin
2007-03-11  5:56 ` Junio C Hamano
2007-03-11  9:13   ` H. Peter Anvin
2007-03-11  9:23   ` H. Peter Anvin
2007-03-11 12:14     ` Johannes Schindelin
2007-03-11 16:01       ` H. Peter Anvin [this message]
2007-03-11 22:01         ` Johannes Schindelin
2007-03-11 17:18   ` H. Peter Anvin
2007-03-11 17:23 ` H. Peter Anvin
2007-03-11 17:37   ` H. Peter Anvin

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=45F427EA.8000905@zytor.com \
    --to=hpa@zytor.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.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.
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).