author | Junio C Hamano <gitster@pobox.com> | |
Mon, 21 Jun 2010 13:02:45 +0000 (06:02 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 21 Jun 2010 13:02:45 +0000 (06:02 -0700) |
* js/async-thread:
fast-import: die_nicely() back to vsnprintf (reverts part of ebaa79f)
Enable threaded async procedures whenever pthreads is available
Dying in an async procedure should only exit the thread, not the process.
Reimplement async procedures using pthreads
Windows: more pthreads functions
Fix signature of fcntl() compatibility dummy
Make report() from usage.c public as vreportf() and use it.
Modernize t5530-upload-pack-error.
Conflicts:
http-backend.c
fast-import: die_nicely() back to vsnprintf (reverts part of ebaa79f)
Enable threaded async procedures whenever pthreads is available
Dying in an async procedure should only exit the thread, not the process.
Reimplement async procedures using pthreads
Windows: more pthreads functions
Fix signature of fcntl() compatibility dummy
Make report() from usage.c public as vreportf() and use it.
Modernize t5530-upload-pack-error.
Conflicts:
http-backend.c
1 | 2 | |||
---|---|---|---|---|
compat/mingw.h | patch | | diff1 | | diff2 | | blob | history |
compat/win32/pthread.h | patch | | diff1 | | diff2 | | blob | history |
git-compat-util.h | patch | | diff1 | | diff2 | | blob | history |
http-backend.c | patch | | diff1 | | diff2 | | blob | history |
run-command.c | patch | | diff1 | | diff2 | | blob | history |
diff --cc compat/mingw.h
Simple merge
diff --cc compat/win32/pthread.h
Simple merge
diff --cc git-compat-util.h
Simple merge
diff --cc http-backend.c
index f0e787e37d9384c11d48dbbc35cfb2b1609368e8,8c7b7d09eaae0d5ac1f3d00f5e3bf9ceb92b54de..44ce6bb32b0e98681f7c523537082065e8cb5fc1
--- 1/http-backend.c
--- 2/http-backend.c
+++ b/http-backend.c
static NORETURN void die_webcgi(const char *err, va_list params)
{
- http_status(500, "Internal Server Error");
- hdr_nocache();
- end_headers();
+ static int dead;
- vreportf("fatal: ", err, params);
- exit(0);
+ if (!dead) {
- char buffer[1000];
+ dead = 1;
-
- vsnprintf(buffer, sizeof(buffer), err, params);
- fprintf(stderr, "fatal: %s\n", buffer);
+ http_status(500, "Internal Server Error");
+ hdr_nocache();
+ end_headers();
++
++ vreportf("fatal: ", err, params);
+ }
+ exit(0); /* we successfully reported a failure ;-) */
}
static char* getdir(void)
diff --cc run-command.c
index c7793f50fbe0a43495c2b2d36a47c0b5aac37483,61b153987b0efb9d9c5c53e2a4aa6893a9362f01..2a1041ef6599c84fff6a8d9faf5dea23a2af3ab0
--- 1/run-command.c
--- 2/run-command.c
+++ b/run-command.c
if (len > sizeof(msg))
len = sizeof(msg);
- write(child_err, "fatal: ", 7);
- write(child_err, msg, len);
- write(child_err, "\n", 1);
+ unused = write(child_err, "fatal: ", 7);
+ unused = write(child_err, msg, len);
+ unused = write(child_err, "\n", 1);
exit(128);
}
+ #endif
static inline void set_cloexec(int fd)
{