diff options
author | Leah Neukirchen <leah@vuxu.org> | 2022-02-03 22:16:29 +0100 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2022-02-03 22:16:29 +0100 |
commit | a61d96ff6a34990be1f2e2099bd8f6ced80fdf77 (patch) | |
tree | e031d9d4160576b74ab87cd9a2e8062707dbda94 | |
parent | 2bd5e698ae6fd85d6671cd9cad94abaa0cd5d92d (diff) | |
download | rvnit-a61d96ff6a34990be1f2e2099bd8f6ced80fdf77.tar.gz rvnit-a61d96ff6a34990be1f2e2099bd8f6ced80fdf77.tar.xz rvnit-a61d96ff6a34990be1f2e2099bd8f6ced80fdf77.zip |
detect close of selflog when POLLIN was set
-rw-r--r-- | rvnit.c | 4 |
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; } |