libevent: revert patch that breaks among others links
see https://archives.seul.org/libevent/users/Aug-2019/msg00009.html
This commit is contained in:
parent
29276676f1
commit
05e401278d
@ -1,5 +1,6 @@
|
||||
untrusted comment: verify with /etc/ports/opt.pub
|
||||
RWSE3ohX2g5d/fBdVwxB4fwK25yHkNVXcItl/mzJXCHcJSCg0ewVj0Rt+G7s2/aWmUHQ+iigthCpMEnD5RMQ1ycVuxEdOdw9Xgw=
|
||||
SHA256 (Pkgfile) = 9c3782df5fadb2c79f3e5f048421e77a61dd7cbc9b215aaacfde2e52fe26371f
|
||||
RWSE3ohX2g5d/bpDGRTMaXUPr34Sp82fpdN2p48I9C9pn8nLvXRIIN1szuaRDmF5DpET3w9Uy7zNLZYC8pDak5JXVxnMnE7hmQs=
|
||||
SHA256 (Pkgfile) = 85c6bb7234edbcf84a545468e7df4531e182c29ea8a5661fb71b887155ee79cf
|
||||
SHA256 (.footprint) = 737d7bae7a37238124f43945d6feab1daca1888d1b735e20d981784916782a6a
|
||||
SHA256 (libevent-2.1.11-stable.tar.gz) = a65bac6202ea8c5609fd5c7e480e6d25de467ea1917c08290c521752f147283d
|
||||
SHA256 (warn-if-forked-from-the-event-loop.patch) = 91572f51556e641b1eff864075cf40b4bb5b0c2fc16f45ab1872e16a391792ad
|
||||
|
@ -5,11 +5,16 @@
|
||||
|
||||
name=libevent
|
||||
version=2.1.11
|
||||
release=1
|
||||
source=(https://github.com/libevent/libevent/releases/download/release-$version-stable/$name-$version-stable.tar.gz)
|
||||
release=2
|
||||
source=(https://github.com/libevent/libevent/releases/download/release-$version-stable/$name-$version-stable.tar.gz
|
||||
warn-if-forked-from-the-event-loop.patch)
|
||||
|
||||
build() {
|
||||
cd $name-$version-stable
|
||||
|
||||
# https://archives.seul.org/libevent/users/Aug-2019/msg00009.html
|
||||
patch -p1 -R -i $SRC/warn-if-forked-from-the-event-loop.patch
|
||||
|
||||
./configure --prefix=/usr
|
||||
make
|
||||
make DESTDIR=$PKG install
|
||||
|
32
libevent/warn-if-forked-from-the-event-loop.patch
Normal file
32
libevent/warn-if-forked-from-the-event-loop.patch
Normal file
@ -0,0 +1,32 @@
|
||||
From b75922ae5b6d7bea6ef2f53618dca6c5760c71b4 Mon Sep 17 00:00:00 2001
|
||||
From: Azat Khuzhin <azat@libevent.org>
|
||||
Date: Mon, 1 Jul 2019 23:54:02 +0300
|
||||
Subject: [PATCH] Warn if forked from the event loop during event_reinit()
|
||||
|
||||
Calling fork() from the event loop is not a great idea, since at least
|
||||
it shares some internal pipes (for handling signals) before
|
||||
event_reinit() call
|
||||
|
||||
Closes: #833
|
||||
(cherry picked from commit 497ef904d544ac51de43934549dbeccce8e6e8f8)
|
||||
---
|
||||
event.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/event.c b/event.c
|
||||
index bfd94ebd0..b2ad34102 100644
|
||||
--- a/event.c
|
||||
+++ b/event.c
|
||||
@@ -987,6 +987,12 @@ 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 */
|
Loading…
x
Reference in New Issue
Block a user