0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-25 16:22:35 +01:00

Fix a mistake in kqueue 'overflow' handling.

If there is no space in the output buffer to report an
error adding to the kqueue, kevent(2) will abort and
return the error in errno (I was correct that it does
not tell you where it failed). So do not abort the loop
if kevent(2) fails and do not log (expected) EBADF.
This commit is contained in:
Jilles Tjoelker 2008-05-14 19:56:41 +02:00
parent 079b48b710
commit 6770b968bc

View file

@ -121,12 +121,9 @@ kq_update_events(rb_fde_t * F, short filter, PF * handler)
{
ret = kevent(kq, kqlst + i, 1, NULL, 0, &zero_timespec);
/* jdc -- someone needs to do error checking... */
if(ret == -1)
{
/* EBADF is normal here -- jilles */
if(ret == -1 && errno != EBADF)
rb_lib_log("kq_update_events(): kevent(): %s", strerror(errno));
kqoff = 0;
return;
}
}
kqoff = 0;
}