pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/xentools46 in xl the SIGCHLD handler just wri...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8043c5690fc1
branches:  trunk
changeset: 356172:8043c5690fc1
user:      bouyer <bouyer%pkgsrc.org@localhost>
date:      Tue Dec 20 17:24:58 2016 +0000

description:
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:

 sysutils/xentools46/Makefile                          |   4 +-
 sysutils/xentools46/distinfo                          |   3 +-
 sysutils/xentools46/patches/patch-libxl_libxl_event.c |  24 +++++++++++++++++++
 3 files changed, 28 insertions(+), 3 deletions(-)

diffs (62 lines):

diff -r c96bed7ba814 -r 8043c5690fc1 sysutils/xentools46/Makefile
--- a/sysutils/xentools46/Makefile      Tue Dec 20 15:06:52 2016 +0000
+++ b/sysutils/xentools46/Makefile      Tue Dec 20 17:24:58 2016 +0000
@@ -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 -r c96bed7ba814 -r 8043c5690fc1 sysutils/xentools46/distinfo
--- a/sysutils/xentools46/distinfo      Tue Dec 20 15:06:52 2016 +0000
+++ b/sysutils/xentools46/distinfo      Tue Dec 20 17:24:58 2016 +0000
@@ -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_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 -r c96bed7ba814 -r 8043c5690fc1 sysutils/xentools46/patches/patch-libxl_libxl_event.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/xentools46/patches/patch-libxl_libxl_event.c     Tue Dec 20 17:24:58 2016 +0000
@@ -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 */



Home | Main Index | Thread Index | Old Index