summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--rvnit.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/rvnit.c b/rvnit.c
index 8c7b36b..dcacdf1 100644
--- a/rvnit.c
+++ b/rvnit.c
@@ -486,6 +486,10 @@ closed_pipe:
 			if (rd == 0) {
 				// some OS set POLLIN|POLLHUP on closed pipes
 				// https://www.greenend.org.uk/rjk/tech/poll.html
+				if (j == 1 && n == 1) {
+					/* selflog was closed, end thread */
+					break;
+				}
 				goto closed_pipe;
 			}