From a61d96ff6a34990be1f2e2099bd8f6ced80fdf77 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Thu, 3 Feb 2022 22:16:29 +0100 Subject: detect close of selflog when POLLIN was set --- rvnit.c | 4 ++++ 1 file changed, 4 insertions(+) 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; } -- cgit 1.4.1