git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: Brady Catherman <brady@catherman.org>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] http-backend: Don't infinite loop during die()
Date: Wed, 24 Mar 2010 14:37:44 -0700	[thread overview]
Message-ID: <7veij91jvb.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20100324200658.GA22505@spearce.org> (Shawn O. Pearce's message of "Wed\, 24 Mar 2010 13\:06\:58 -0700")

"Shawn O. Pearce" <spearce@spearce.org> writes:

> Just exit(0) if dead is true.

heh, very true.

-- >8 --
Subject: [PATCH] fixup! http-backend.c: Don't infinite loop

Now die_webcgi() actually can return during a recursive call into it,
causing

    http-backend.c:554: error: 'noreturn' function does return

The only reason we would come back to the die handler is because we
failed during it, so we cannot report anything anyway.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 http-backend.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/http-backend.c b/http-backend.c
index f4d49b6..5e3f277 100644
--- a/http-backend.c
+++ b/http-backend.c
@@ -549,8 +549,8 @@ static NORETURN void die_webcgi(const char *err, va_list params)
 		http_status(500, "Internal Server Error");
 		hdr_nocache();
 		end_headers();
-		exit(0);
 	}
+	exit(0); /* keep apache happy */
 }
 
 static char* getdir(void)

      parent reply	other threads:[~2010-03-24 21:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-22  6:52 git clone over smart-http hanging for just one repo Brady Catherman
2010-03-22 14:12 ` Shawn O. Pearce
2010-03-22 14:22 ` [PATCH] http-backend: Don't infinite loop during die() Shawn O. Pearce
2010-03-22 20:25   ` Junio C Hamano
2010-03-24 18:29   ` Junio C Hamano
2010-03-24 20:06     ` Shawn O. Pearce
2010-03-24 20:24       ` Nicolas Pitre
2010-03-24 20:25         ` Shawn Pearce
2010-03-24 21:37       ` Junio C Hamano [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

  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=7veij91jvb.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=brady@catherman.org \
    --cc=git@vger.kernel.org \
    --cc=spearce@spearce.org \
    /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).