diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-03-20 15:16:06 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-03-20 15:16:06 +0900 |
commit | 27cdbdd134f181fc97f9589039ed7c0d12759b5a (patch) | |
tree | 3a42ab156427cfa7c1b7bd2f7d08469b6fdfc434 /builtin | |
parent | Merge branch 'jk/fsck-doc' (diff) | |
parent | fetch: ignore SIGPIPE during network operation (diff) | |
download | tgif-27cdbdd134f181fc97f9589039ed7c0d12759b5a.tar.xz |
Merge branch 'jk/no-sigpipe-during-network-transport'
On platforms where "git fetch" is killed with SIGPIPE (e.g. OSX),
the upload-pack that runs on the other end that hangs up after
detecting an error could cause "git fetch" to die with a signal,
which led to a flakey test. "git fetch" now ignores SIGPIPE during
the network portion of its operation (this is not a problem as we
check the return status from our write(2)s).
* jk/no-sigpipe-during-network-transport:
fetch: ignore SIGPIPE during network operation
fetch: avoid calling write_or_die()
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/fetch.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c index b620fd54b4..4ba63d5ac6 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -1556,7 +1556,9 @@ static int fetch_one(struct remote *remote, int argc, const char **argv, int pru sigchain_push_common(unlock_pack_on_signal); atexit(unlock_pack); + sigchain_push(SIGPIPE, SIG_IGN); exit_code = do_fetch(gtransport, &rs); + sigchain_pop(SIGPIPE); refspec_clear(&rs); transport_disconnect(gtransport); gtransport = NULL; |