This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project iwhd.git.
The branch, master has been updated
via 4866f4e6b9f3c966170f349eb6db74d2ff2d1692 (commit)
via aeb23797cf2e1e8ce6d57ec341235d48abb05e2f (commit)
from 64c29da2559a084d3ba74dcdaa03cbd0f4189dee (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://repo.or.cz/w/iwhd.git/commit/4866f4e6b9f3c966170f349eb6db74d2ff2d1692
commit 4866f4e6b9f3c966170f349eb6db74d2ff2d1692
Author: Jim Meyering <meyering(a)redhat.com>
Date: Tue Oct 5 14:05:56 2010 +0200
build: GNUmakefile: new file, for better output from "make check"
This file is used only via GNU make.
For now, its main purpose is to ensure that VERBOSE=yes
is always set in the environment. That ensures more useful
output from "make check" and that automake-generated code
in Makefile prints more details upon failure.
A tiny bonus: you also get a diagnostic when
running "make" without a configure file.
diff --git a/GNUmakefile b/GNUmakefile
new file mode 100644
index 0000000..1cb7735
--- /dev/null
+++ b/GNUmakefile
@@ -0,0 +1,21 @@
+# This makefile is used only if you run GNU Make.
+# It is necessary if you modify files in the m4/ directory or
+# want to build targets usually of interest only to the maintainer.
+
+have-Makefile := $(shell test -f Makefile && echo yes)
+
+# If the user runs GNU make but has not yet run ./configure,
+# give them a diagnostic.
+ifeq ($(have-Makefile),yes)
+
+export VERBOSE = yes
+include Makefile
+
+else
+
+all:
+ @echo There seems to be no Makefile in this directory.
+ @echo "You must run ./configure before running `make'."
+ @exit 1
+
+endif
http://repo.or.cz/w/iwhd.git/commit/aeb23797cf2e1e8ce6d57ec341235d48abb05e2f
commit aeb23797cf2e1e8ce6d57ec341235d48abb05e2f
Author: Jim Meyering <meyering(a)redhat.com>
Date: Tue Oct 5 08:02:00 2010 +0200
don't ignore failed thread creation
* proxy.c (xpthread_create): New macro.
(repl_worker): Use it to diagnose thread creation failure and to
propagate any failure to caller.
diff --git a/proxy.c b/proxy.c
index bf4c165..fa25e54 100644
--- a/proxy.c
+++ b/proxy.c
@@ -744,6 +744,16 @@ repl_worker_bcreate (repl_item *item)
DPRINTF("%s returningn",__func__);
}
+/* Use this to diagnose failed thread creation. */
+#define xpthread_create(thread, start_routine, msg) + do { + int err =
pthread_create (thread, NULL, start_routine, NULL); + if (err) { + error
(0, err, msg); + return NULL; + } + } while (0)
+
static void *
repl_worker (void *notused ATTRIBUTE_UNUSED)
{
@@ -764,15 +774,12 @@ repl_worker (void *notused ATTRIBUTE_UNUSED)
switch (item->type) {
case REPL_PUT:
if (pipe(item->pipes) >= 0) {
- if (proxy_host) {
- pthread_create(&prod,NULL,
- proxy_repl_prod,item);
- }
- else {
- pthread_create(&prod,NULL,
- proxy_repl_prod_fs,item);
- }
- pthread_create(&cons,NULL,proxy_repl_cons,item);
+ xpthread_create(&prod, (proxy_host
+ ? proxy_repl_prod
+ : proxy_repl_prod_fs),
+ "failed to start producer thread");
+ xpthread_create(&cons,proxy_repl_cons,
+ "failed to start consumer thread");
pthread_join(prod,NULL);
pthread_join(cons,NULL);
}
-----------------------------------------------------------------------
Summary of changes:
GNUmakefile | 21 +++++++++++++++++++++
proxy.c | 25 ++++++++++++++++---------
2 files changed, 37 insertions(+), 9 deletions(-)
create mode 100644 GNUmakefile
repo.or.cz automatic notification. Contact project admin jim(a)meyering.net
if you want to unsubscribe, or site admin admin(a)repo.or.cz if you receive
no reply.
--
iwhd.git ("image warehouse daemon")