mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-09 12:28:19 -04:00
support disabling of event mechanisms via the environment; error out
if no event mechanism is available svn:r38
This commit is contained in:
parent
b3d1c6a854
commit
b5b585c1f9
3
event.c
3
event.c
@ -133,6 +133,9 @@ event_init(void)
|
||||
evbase = evsel->init();
|
||||
}
|
||||
|
||||
if (evbase == NULL)
|
||||
errx(1, "%s: no event mechanism available", __func__);
|
||||
|
||||
#if defined(USE_LOG) && defined(USE_DEBUG)
|
||||
log_to(stderr);
|
||||
log_debug_cmd(LOG_MISC, 80);
|
||||
|
4
poll.c
4
poll.c
@ -92,6 +92,10 @@ struct eventop pollops = {
|
||||
void *
|
||||
poll_init(void)
|
||||
{
|
||||
/* Disable kqueue when this environment variable is set */
|
||||
if (getenv("EVENT_NOPOLL"))
|
||||
return (NULL);
|
||||
|
||||
memset(&pop, 0, sizeof(pop));
|
||||
|
||||
evsignal_init(&pop.evsigmask);
|
||||
|
Loading…
x
Reference in New Issue
Block a user