Skip to content

Commit

Permalink
Revert "Warn if forked from the event loop during event_reinit()"
Browse files Browse the repository at this point in the history
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]: libevent#833 (comment)

This reverts commit 497ef90.

Reported-by: [email protected]
Backport-to: 2.1
  • Loading branch information
azat committed Sep 2, 2019
1 parent b5e1d91 commit ddacaef
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions event.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit ddacaef

Please sign in to comment.