diff options
author | Juergen Daubert <jue@jue.li> | 2019-08-31 10:07:46 +0200 |
---|---|---|
committer | Juergen Daubert <jue@jue.li> | 2019-08-31 10:07:46 +0200 |
commit | 05e401278d32dc1b68520c57eb6449e9c665b1d7 (patch) | |
tree | 998b386d4904ed3750b996a8fd22c4d3b353e6f1 /libevent | |
parent | 29276676f152098ea4ce037386ee3b47ccfaea2f (diff) | |
download | opt-05e401278d32dc1b68520c57eb6449e9c665b1d7.tar.gz opt-05e401278d32dc1b68520c57eb6449e9c665b1d7.tar.xz |
libevent: revert patch that breaks among others links
see https://archives.seul.org/libevent/users/Aug-2019/msg00009.html
Diffstat (limited to 'libevent')
-rw-r--r-- | libevent/.signature | 5 | ||||
-rw-r--r-- | libevent/Pkgfile | 9 | ||||
-rw-r--r-- | libevent/warn-if-forked-from-the-event-loop.patch | 32 |
3 files changed, 42 insertions, 4 deletions
diff --git a/libevent/.signature b/libevent/.signature index 98f8b0883..6d620a862 100644 --- a/libevent/.signature +++ b/libevent/.signature @@ -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 diff --git a/libevent/Pkgfile b/libevent/Pkgfile index a8cdb4f9d..f7ede4364 100644 --- a/libevent/Pkgfile +++ b/libevent/Pkgfile @@ -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 diff --git a/libevent/warn-if-forked-from-the-event-loop.patch b/libevent/warn-if-forked-from-the-event-loop.patch new file mode 100644 index 000000000..b6fd3ecea --- /dev/null +++ b/libevent/warn-if-forked-from-the-event-loop.patch @@ -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 */ |