1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-17 22:24:49 +00:00

Add EV_EOF and EV_CLEAR to selfpipe for kqueue

This commit is contained in:
Calvin Rose 2023-10-08 12:34:13 -05:00
parent cf4901e713
commit 5442c8e86d

View File

@ -1900,7 +1900,7 @@ void janet_ev_init(void) {
janet_vm.timer_enabled = 0; janet_vm.timer_enabled = 0;
if (janet_vm.kq == -1) goto error; if (janet_vm.kq == -1) goto error;
struct kevent event; 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); add_kqueue_events(&event, 1);
return; return;
error: error: