[arch-commits] Commit in libevent/repos (3 files)

Christian Hesse eworm at archlinux.org
Fri Aug 30 20:13:34 UTC 2019


    Date: Friday, August 30, 2019 @ 20:13:34
  Author: eworm
Revision: 361435

archrelease: copy trunk to testing-x86_64

Added:
  libevent/repos/testing-x86_64/
  libevent/repos/testing-x86_64/0001-Warn-if-forked-from-the-event-loop-during-event_reinit.patch
    (from rev 361434, libevent/trunk/0001-Warn-if-forked-from-the-event-loop-during-event_reinit.patch)
  libevent/repos/testing-x86_64/PKGBUILD
    (from rev 361434, libevent/trunk/PKGBUILD)

-------------------------------------------------------------------+
 0001-Warn-if-forked-from-the-event-loop-during-event_reinit.patch |   31 +++++++
 PKGBUILD                                                          |   42 ++++++++++
 2 files changed, 73 insertions(+)

Copied: libevent/repos/testing-x86_64/0001-Warn-if-forked-from-the-event-loop-during-event_reinit.patch (from rev 361434, libevent/trunk/0001-Warn-if-forked-from-the-event-loop-during-event_reinit.patch)
===================================================================
--- testing-x86_64/0001-Warn-if-forked-from-the-event-loop-during-event_reinit.patch	                        (rev 0)
+++ testing-x86_64/0001-Warn-if-forked-from-the-event-loop-during-event_reinit.patch	2019-08-30 20:13:34 UTC (rev 361435)
@@ -0,0 +1,31 @@
+From 497ef904d544ac51de43934549dbeccce8e6e8f8 Mon Sep 17 00:00:00 2001
+From: Azat Khuzhin <azat at 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
+---
+ event.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/event.c b/event.c
+index fa4f2802e..aa6c6fba3 100644
+--- a/event.c
++++ b/event.c
+@@ -1003,6 +1003,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 */

Copied: libevent/repos/testing-x86_64/PKGBUILD (from rev 361434, libevent/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD	                        (rev 0)
+++ testing-x86_64/PKGBUILD	2019-08-30 20:13:34 UTC (rev 361435)
@@ -0,0 +1,42 @@
+# Maintainer: Tom Gundersen <teg at jklm.no>
+# Contributor: Judd <jvinet at zeroflux.org>
+
+pkgname=libevent
+pkgver=2.1.11
+pkgrel=2
+pkgdesc="An event notification library"
+arch=('x86_64')
+url="https://libevent.org/"
+license=('BSD')
+depends=('openssl')
+optdepends=('python2: to use event_rpcgen.py')
+source=(https://github.com/libevent/libevent/releases/download/release-$pkgver-stable/$pkgname-$pkgver-stable.tar.gz{,.asc}
+        0001-Warn-if-forked-from-the-event-loop-during-event_reinit.patch)
+sha256sums=('a65bac6202ea8c5609fd5c7e480e6d25de467ea1917c08290c521752f147283d'
+            'SKIP'
+            '436e56c74c0af0b70c43eaae6bd32b760601d2d5fa98b8d2d026ffad18474e13')
+validpgpkeys=('B35BF85BF19489D04E28C33C21194EBB165733EA'
+              '9E3AC83A27974B84D1B3401DB86086848EF8686D')
+
+prepare() {
+  cd ${pkgname}-${pkgver}-stable
+  patch -Np1 -R < ../0001-Warn-if-forked-from-the-event-loop-during-event_reinit.patch
+}
+
+build() {
+  cd ${pkgname}-${pkgver}-stable
+  ./autogen.sh
+  ./configure --prefix=/usr --sysconfdir=/etc --disable-libevent-regress
+  make
+}
+
+check() {
+  cd ${pkgname}-${pkgver}-stable
+  make -j1 check
+}
+
+package() {
+  cd ${pkgname}-${pkgver}-stable
+  make DESTDIR="${pkgdir}" install
+  install -Dm 644 LICENSE "${pkgdir}"/usr/share/licenses/libevent/LICENSE
+}



More information about the arch-commits mailing list