Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-09-27 01:39:44 +0400
committerJunio C Hamano <gitster@pobox.com>2014-09-27 01:39:44 +0400
commitbdab1bca53b71fd6bd2420d1e007eb2ef7b8abc3 (patch)
tree47cf14e920aad5a552426fd0b3b4c024f3d31cf5 /builtin/receive-pack.c
parentc0f5f311dbb219c88a2da4a3029f9c7d9c554753 (diff)
parentec7dbd145bd8ea27d958dcb16e19b5f0ef3fd643 (diff)
Merge branch 'jc/ignore-sigpipe-while-running-hooks'
pre- and post-receive hooks are no longer required to read all their inputs. * jc/ignore-sigpipe-while-running-hooks: receive-pack: allow hooks to ignore its standard input stream
Diffstat (limited to 'builtin/receive-pack.c')
-rw-r--r--builtin/receive-pack.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index afb8d99264..daf0600ca3 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -15,6 +15,7 @@
#include "connected.h"
#include "argv-array.h"
#include "version.h"
+#include "sigchain.h"
static const char receive_pack_usage[] = "git receive-pack <git-dir>";
@@ -287,6 +288,8 @@ static int run_and_feed_hook(const char *hook_name, feed_fn feed, void *feed_sta
return code;
}
+ sigchain_push(SIGPIPE, SIG_IGN);
+
while (1) {
const char *buf;
size_t n;
@@ -298,6 +301,9 @@ static int run_and_feed_hook(const char *hook_name, feed_fn feed, void *feed_sta
close(proc.in);
if (use_sideband)
finish_async(&muxer);
+
+ sigchain_pop(SIGPIPE);
+
return finish_command(&proc);
}