Re: [PATCH v12 03/20] pkt-line: add gentle version of packet_write

2016-06-25 Thread Duy Nguyen
On Thu, May 19, 2016 at 11:45 PM, David Turner wrote: > +int packet_flush_gently(int fd) > +{ > + packet_trace("", 4, 1); > + return write_in_full(fd, "", 4) != 4; > +} The return value convention here is a bit weird, isn't it? Usually we have "zero good, minus one (or negati

[PATCH v12 03/20] pkt-line: add gentle version of packet_write

2016-05-19 Thread David Turner
packet_write calls write_or_die, which dies with a sigpipe even if calling code has explicitly blocked that signal. Add packet_write_gently and packet_flush_gently, which don't. Soon, we will use this for communication with git index-helper, which, being merely an optimization, should be permitte