From b643ba1dbac706cc06d51a17dd76924a32253376 Mon Sep 17 00:00:00 2001 From: ajacoutot Date: Wed, 19 Oct 2011 15:04:45 +0000 Subject: [PATCH] unix_signal_helper_thread: loop in read(2) on EINTR. --- devel/glib2/Makefile | 4 ++-- devel/glib2/patches/patch-glib_gmain_c | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 devel/glib2/patches/patch-glib_gmain_c diff --git a/devel/glib2/Makefile b/devel/glib2/Makefile index 12745bed467..3bb1d842256 100644 --- a/devel/glib2/Makefile +++ b/devel/glib2/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.142 2011/10/19 06:38:16 robert Exp $ +# $OpenBSD: Makefile,v 1.143 2011/10/19 15:04:45 ajacoutot Exp $ COMMENT-main= general-purpose utility library COMMENT-docs= glib2 documentation @@ -10,7 +10,7 @@ EXTRACT_SUFX= .tar.xz PKGNAME-main= glib2-${VERSION} PKGNAME-docs= glib2-docs-${VERSION} -REVISION-main= 0 +REVISION-main= 1 CATEGORIES= devel diff --git a/devel/glib2/patches/patch-glib_gmain_c b/devel/glib2/patches/patch-glib_gmain_c new file mode 100644 index 00000000000..550e49f39d8 --- /dev/null +++ b/devel/glib2/patches/patch-glib_gmain_c @@ -0,0 +1,22 @@ +$OpenBSD: patch-glib_gmain_c,v 1.6 2011/10/19 15:04:45 ajacoutot Exp $ + +Rewrote upstream, but provides similar functionnality. +(test with GDM that the following does not happen: +Failed to read from child watch wake up pipe: Interrupted system call) + +--- glib/gmain.c.orig Wed Oct 19 16:38:09 2011 ++++ glib/gmain.c Wed Oct 19 14:09:17 2011 +@@ -4549,6 +4549,13 @@ unix_signal_helper_thread (gpointer data) + gboolean sighup_received = FALSE; + + bytes_read = read (unix_signal_wake_up_pipe[0], b, sizeof (b)); ++ ++ do ++ { ++ bytes_read = read (unix_signal_wake_up_pipe[0], b, sizeof (b)); ++ } ++ while (bytes_read == -1 && errno == EINTR); ++ + if (bytes_read < 0) + { + g_warning ("Failed to read from child watch wake up pipe: %s",