From 038ce90f2ff91587f2d61993f5c4c23d6fdca144 Mon Sep 17 00:00:00 2001 From: Lars Schneider Date: Sun, 16 Oct 2016 16:20:32 -0700 Subject: pkt-line: add packet_flush_gently() packet_flush() would die in case of a write error even though for some callers an error would be acceptable. Add packet_flush_gently() which writes a pkt-line flush packet like packet_flush() but does not die in case of an error. The function is used in a subsequent patch. Signed-off-by: Lars Schneider Signed-off-by: Junio C Hamano --- pkt-line.h | 1 + 1 file changed, 1 insertion(+) (limited to 'pkt-line.h') diff --git a/pkt-line.h b/pkt-line.h index 3caea7772..3fa089948 100644 --- a/pkt-line.h +++ b/pkt-line.h @@ -23,6 +23,7 @@ void packet_flush(int fd); void packet_write_fmt(int fd, const char *fmt, ...) __attribute__((format (printf, 2, 3))); void packet_buf_flush(struct strbuf *buf); void packet_buf_write(struct strbuf *buf, const char *fmt, ...) __attribute__((format (printf, 2, 3))); +int packet_flush_gently(int fd); int packet_write_fmt_gently(int fd, const char *fmt, ...) __attribute__((format (printf, 2, 3))); /* -- cgit v1.2.1