mirror of
https://github.com/git/git
synced 2024-10-30 03:13:24 +00:00
Merge branch 'sp/maint-http-backend-die-triggers-die-recursively'
* sp/maint-http-backend-die-triggers-die-recursively: http-backend: Don't infinite loop during die()
This commit is contained in:
commit
7b1cb5c40e
1 changed files with 11 additions and 7 deletions
|
@ -538,15 +538,19 @@ static void service_rpc(char *service_name)
|
|||
|
||||
static NORETURN void die_webcgi(const char *err, va_list params)
|
||||
{
|
||||
char buffer[1000];
|
||||
static int dead;
|
||||
|
||||
http_status(500, "Internal Server Error");
|
||||
hdr_nocache();
|
||||
end_headers();
|
||||
if (!dead) {
|
||||
char buffer[1000];
|
||||
dead = 1;
|
||||
|
||||
vsnprintf(buffer, sizeof(buffer), err, params);
|
||||
fprintf(stderr, "fatal: %s\n", buffer);
|
||||
exit(0);
|
||||
vsnprintf(buffer, sizeof(buffer), err, params);
|
||||
fprintf(stderr, "fatal: %s\n", buffer);
|
||||
http_status(500, "Internal Server Error");
|
||||
hdr_nocache();
|
||||
end_headers();
|
||||
}
|
||||
exit(0); /* we successfully reported a failure ;-) */
|
||||
}
|
||||
|
||||
static char* getdir(void)
|
||||
|
|
Loading…
Reference in a new issue