summaryrefslogtreecommitdiff
path: root/pkt-line.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-03-20 06:16:06 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-03-20 06:16:06 (GMT)
commit27cdbdd134f181fc97f9589039ed7c0d12759b5a (patch)
tree3a42ab156427cfa7c1b7bd2f7d08469b6fdfc434 /pkt-line.c
parentea327760d38b03be552418de044843cd2f0dba2e (diff)
parent143588949c8a0672302403c722fc433a5bb2ea2a (diff)
downloadgit-27cdbdd134f181fc97f9589039ed7c0d12759b5a.zip
git-27cdbdd134f181fc97f9589039ed7c0d12759b5a.tar.gz
git-27cdbdd134f181fc97f9589039ed7c0d12759b5a.tar.bz2
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 'pkt-line.c')
-rw-r--r--pkt-line.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/pkt-line.c b/pkt-line.c
index 60329b3..ffd7220 100644
--- a/pkt-line.c
+++ b/pkt-line.c
@@ -88,13 +88,15 @@ static void packet_trace(const char *buf, unsigned int len, int write)
void packet_flush(int fd)
{
packet_trace("0000", 4, 1);
- write_or_die(fd, "0000", 4);
+ if (write_in_full(fd, "0000", 4) < 0)
+ die_errno(_("unable to write flush packet"));
}
void packet_delim(int fd)
{
packet_trace("0001", 4, 1);
- write_or_die(fd, "0001", 4);
+ if (write_in_full(fd, "0001", 4) < 0)
+ die_errno(_("unable to write delim packet"));
}
int packet_flush_gently(int fd)