From e6c6502b8e408c5a0c62bd0fa30f958fedc253f6 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Sun, 17 Oct 2021 16:12:35 +0200 Subject: Proper handling of allowBrokenPipe Apparently I didn't test this? --- process.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/process.cpp b/process.cpp index 6adc417..7bddc41 100644 --- a/process.cpp +++ b/process.cpp @@ -144,7 +144,7 @@ bool Process::writeLine(const string_view line, bool allowBrokenPipe) { ssize_t nw = write(infd, str.data() + cursor, str.size() - cursor); if (nw < 0) { if (errno == EINTR) continue; - if (allowBrokenPipe && errno == EPIPE) continue; + if (allowBrokenPipe && errno == EPIPE) break; perror("write"); return false; } -- cgit v1.2.3-70-g09d2