44 lines
1.2 KiB
Diff
44 lines
1.2 KiB
Diff
#upstream: yes
|
|
|
|
From ddacaef59ab6808a0801007d0a681f2415af4871 Mon Sep 17 00:00:00 2001
|
|
From: Azat Khuzhin <azat@libevent.org>
|
|
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
|
|
---
|
|
event.c | 6 ------
|
|
1 file changed, 6 deletions(-)
|
|
|
|
diff --git a/event.c b/event.c
|
|
index 8cae318d1..ff4e79c84 100644
|
|
--- event.c
|
|
+++ event.c
|
|
@@ -1003,12 +1003,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 */
|