summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--process.cpp2
1 files changed, 1 insertions, 1 deletions
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;
}