From 5442c8e86df3d21ff903a4e89e46f726160b085e Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Sun, 8 Oct 2023 12:34:13 -0500 Subject: [PATCH] Add EV_EOF and EV_CLEAR to selfpipe for kqueue --- src/core/ev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/ev.c b/src/core/ev.c index 057296a7..823a13e3 100644 --- a/src/core/ev.c +++ b/src/core/ev.c @@ -1900,7 +1900,7 @@ void janet_ev_init(void) { janet_vm.timer_enabled = 0; if (janet_vm.kq == -1) goto error; struct kevent event; - EV_SETx(&event, janet_vm.selfpipe[0], EVFILT_READ, EV_ADD | EV_ENABLE, 0, 0, janet_vm.selfpipe); + EV_SETx(&event, janet_vm.selfpipe[0], EVFILT_READ, EV_ADD | EV_ENABLE | EV_EOF | EV_CLEAR, 0, 0, janet_vm.selfpipe); add_kqueue_events(&event, 1); return; error: