1
0
mirror of https://github.com/janet-lang/janet synced 2024-12-26 08:20:27 +00:00

Better exit (error?) message

The prior calls to exit(-1) were wrong anyway and they may at this point
be hindering figuring out what's going on in suite 9.
This commit is contained in:
llmII 2021-09-03 17:13:54 -05:00
parent f2e4c1ae9a
commit f48dbde736
No known key found for this signature in database
GPG Key ID: E3AD2E259F58A9A0

View File

@ -1601,10 +1601,10 @@ void add_kqueue_events(const struct kevent *events, int length) {
int status;
status = kevent(janet_vm.kq, events, length, NULL, 0, NULL);
if(status == -1 && errno != EINTR)
exit(-1); /* do a better exit */
janet_panicv(janet_ev_lasterr());
for(int i = 0; i < length; i++) {
if((events[i].flags & EV_ERROR) && events[i].data != EINTR) {
exit(-1); /* do a better exit */
janet_panicv(janet_ev_lasterr());
}
}
}