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()
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user