summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorbouyer <bouyer@pkgsrc.org>2016-12-20 17:24:58 +0000
committerbouyer <bouyer@pkgsrc.org>2016-12-20 17:24:58 +0000
commite466f1093e0206378bc5fbf90d5150d04b1ec818 (patch)
treefaf389979b3d8f20c1614f6c9ddbed8d69f3ee1b /sysutils
parent404c70c74ee4f686205fb661b39787e25ac8413c (diff)
downloadpkgsrc-e466f1093e0206378bc5fbf90d5150d04b1ec818.tar.gz
in xl the SIGCHLD handler just writes to a pipe where the reader is the
same process. The idea is that this will cause poll(2) in the main thread to exit with the reaper pipe readable, and do child cleanup here. Unfortunably, is the child also has a write pipe back to the parent (as e.g. with pygrub), the loop in afterpoll_internal() may see the POLLHUP event on this pipe before the POLLIN even on the reaper pipe, and this will be considered as an error (from e.g. pygrub). work around by filtering POLLHUP events here bump PKGREVISION
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/xentools46/Makefile4
-rw-r--r--sysutils/xentools46/distinfo3
-rw-r--r--sysutils/xentools46/patches/patch-libxl_libxl_event.c24
3 files changed, 28 insertions, 3 deletions
diff --git a/sysutils/xentools46/Makefile b/sysutils/xentools46/Makefile
index 5d36c9592aa..1f60e8524a1 100644
--- a/sysutils/xentools46/Makefile
+++ b/sysutils/xentools46/Makefile
@@ -1,11 +1,11 @@
-# $NetBSD: Makefile,v 1.5 2016/12/20 10:22:29 bouyer Exp $
+# $NetBSD: Makefile,v 1.6 2016/12/20 17:24:58 bouyer Exp $
VERSION= 4.6.3
VERSION_IPXE= 9a93db3f0947484e30e753bbd61a10b17336e20e
DISTNAME= xen-${VERSION}
PKGNAME= xentools46-${VERSION}
-PKGREVISION= 3
+PKGREVISION= 4
CATEGORIES= sysutils
MASTER_SITES= http://bits.xensource.com/oss-xen/release/${VERSION}/
diff --git a/sysutils/xentools46/distinfo b/sysutils/xentools46/distinfo
index 7faa587b60c..22fae40a404 100644
--- a/sysutils/xentools46/distinfo
+++ b/sysutils/xentools46/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.3 2016/12/20 10:22:29 bouyer Exp $
+$NetBSD: distinfo,v 1.4 2016/12/20 17:24:58 bouyer Exp $
SHA1 (ipxe-git-9a93db3f0947484e30e753bbd61a10b17336e20e.tar.gz) = fecadf952821e830ce1a1d19655288eef8488f88
RMD160 (ipxe-git-9a93db3f0947484e30e753bbd61a10b17336e20e.tar.gz) = 539bfa12db7054228250d6dd380bbf96c1a040f8
@@ -42,6 +42,7 @@ SHA1 (patch-libxl_Makefile) = ae3beed81b51e60780123bc275f77b2b8c6ef660
SHA1 (patch-libxl_libxl__create.c) = d4c94e9a389e9a7601513460f31c82e4f4bf28c9
SHA1 (patch-libxl_libxl__netbsd.c) = afab3cabdc47690dcee7f8b00e2e84b9119ebcec
SHA1 (patch-libxl_libxl__save__helper.c) = 70e5237e28bea1aa87486e080fc25aa81300a6d8
+SHA1 (patch-libxl_libxl_event.c) = d26a9372b6cc822d4a54765a04a36ce0cb004451
SHA1 (patch-libxl_libxl_uuid.c) = d14286be8ccdbcb5fae544a1968e7b681b63e884
SHA1 (patch-libxl_xl__cmdtable.c) = d149603cac13c996d7800cee94a9df3aaadf9625
SHA1 (patch-ocaml_common.make) = 4d4bddca7b5d93489a3f6620af51d95bbe265abb
diff --git a/sysutils/xentools46/patches/patch-libxl_libxl_event.c b/sysutils/xentools46/patches/patch-libxl_libxl_event.c
new file mode 100644
index 00000000000..0c5cc41716d
--- /dev/null
+++ b/sysutils/xentools46/patches/patch-libxl_libxl_event.c
@@ -0,0 +1,24 @@
+$NetBSD: patch-libxl_libxl_event.c,v 1.1 2016/12/20 17:24:58 bouyer Exp $
+
+The SIGCHLD handler just writes to a pipe where the reader is the
+same process. The idea is that this will cause poll(2) in the main
+thread to exit with the reaper pipe readable, and do child cleanup here.
+
+Unfortunably, is the child also has a write pipe back to the
+parent (as e.g. with pygrub), the loop in afterpoll_internal() may see the
+POLLHUP event on this pipe before the POLLIN even on the reaper pipe, and
+this will be considered as an error (from e.g. pygrub).
+
+work around by filtering POLLHUP events here
+
+--- libxl/libxl_event.c.orig 2016-12-20 16:01:30.000000000 +0100
++++ libxl/libxl_event.c 2016-12-20 17:28:52.000000000 +0100
+@@ -1261,7 +1261,7 @@
+
+ revents = afterpoll_check_fd(poller,fds,nfds,
+ efd->fd,efd->events);
+- if (revents)
++ if (revents & ~POLLHUP)
+ goto found_fd_event;
+ }
+ /* no ordinary fd events, then */