summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klausmann <klausman@gentoo.org>2015-10-15 09:38:47 +0200
committerTobias Klausmann <klausman@gentoo.org>2015-10-15 09:38:47 +0200
commit9183fd4b8989b9411c96db8b7f71780422af4b2e (patch)
tree6ea54785c3c924d4b348f2b8009801c71547da56 /dev-libs/libevent/files/event_signals_ordering.patch
parentsys-kernel/vanilla-sources: Automated version bump to 3.2.72 - remove old. (diff)
downloadgentoo-9183fd4b8989b9411c96db8b7f71780422af4b2e.tar.gz
gentoo-9183fd4b8989b9411c96db8b7f71780422af4b2e.tar.bz2
gentoo-9183fd4b8989b9411c96db8b7f71780422af4b2e.zip
dev-libs/libevent: Add patch to fix Zombie leftovers
When-if upstream makes a release that contains this patch, we can drop it. But since it has been six months without a release, let'suse it directly ourselves. Gentoo-Bug: 540456 Libevent-Bug: http://sourceforge.net/p/levent/bugs/350/ Package-Manager: portage-2.2.23
Diffstat (limited to 'dev-libs/libevent/files/event_signals_ordering.patch')
-rw-r--r--dev-libs/libevent/files/event_signals_ordering.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/dev-libs/libevent/files/event_signals_ordering.patch b/dev-libs/libevent/files/event_signals_ordering.patch
new file mode 100644
index 000000000000..d0cb2b3b4bcf
--- /dev/null
+++ b/dev-libs/libevent/files/event_signals_ordering.patch
@@ -0,0 +1,36 @@
+diff --git a/event.c b/event.c
+index acef2b2..ad4c7f0 100644
+--- a/event.c
++++ b/event.c
+@@ -926,13 +926,13 @@ event_reinit(struct event_base *base)
+ event_del_nolock_(&base->sig.ev_signal, EVENT_DEL_AUTOBLOCK);
+ event_debug_unassign(&base->sig.ev_signal);
+ memset(&base->sig.ev_signal, 0, sizeof(base->sig.ev_signal));
+- if (base->sig.ev_signal_pair[0] != -1)
+- EVUTIL_CLOSESOCKET(base->sig.ev_signal_pair[0]);
+- if (base->sig.ev_signal_pair[1] != -1)
+- EVUTIL_CLOSESOCKET(base->sig.ev_signal_pair[1]);
+ had_signal_added = 1;
+ base->sig.ev_signal_added = 0;
+ }
++ if (base->sig.ev_signal_pair[0] != -1)
++ EVUTIL_CLOSESOCKET(base->sig.ev_signal_pair[0]);
++ if (base->sig.ev_signal_pair[1] != -1)
++ EVUTIL_CLOSESOCKET(base->sig.ev_signal_pair[1]);
+ if (base->th_notify_fn != NULL) {
+ was_notifiable = 1;
+ base->th_notify_fn = NULL;
+@@ -981,8 +981,12 @@ event_reinit(struct event_base *base)
+ if (evmap_reinit_(base) < 0)
+ res = -1;
+ } else {
+- if (had_signal_added)
+ res = evsig_init_(base);
++ if (res == 0 && had_signal_added) {
++ res = event_add_nolock_(&base->sig.ev_signal, NULL, 0);
++ if (res == 0)
++ base->sig.ev_signal_added = 1;
++ }
+ }
+
+ /* If we were notifiable before, and nothing just exploded, become