From 71f5c0d349a22fb90e9f88a687702d6ab7b97c6f Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Thu, 29 Aug 2019 22:57:44 +0300 Subject: [PATCH] Revert "Warn if forked from the event loop during event_reinit()" Thinking about this more and realizing that this was a mistake, so should be reverted. In a nut shell I guess most of the apps calls event_reinit() from the loop (see [1] for example), and this should be totally fine (the bit with the signals [2] handled in event_reinit() gracefully) [1]: https://archives.seul.org/libevent/users/Aug-2019/msg00009.html [2]: https://github.com/libevent/libevent/pull/833#issuecomment-501834453 This reverts commit 497ef904d544ac51de43934549dbeccce8e6e8f8. Reported-by: mikulas@twibright.com Backport-to: 2.1 (cherry picked from commit ddacaef59ab6808a0801007d0a681f2415af4871) --- event.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/event.c b/event.c index f370aece..31615886 100644 --- a/event.c +++ b/event.c @@ -987,12 +987,6 @@ event_reinit(struct event_base *base) EVBASE_ACQUIRE_LOCK(base, th_base_lock); - if (base->running_loop) { - event_warnx("%s: forked from the event_loop.", __func__); - res = -1; - goto done; - } - evsel = base->evsel; /* check if this event mechanism requires reinit on the backend */