From fec889338e5d38f5c45e1c9f4154e4e270ab8c0c Mon Sep 17 00:00:00 2001 From: marcus Date: Thu, 11 Jan 2007 18:02:04 +0000 Subject: Read the pid from dbus-daemon twice to avoid a SIGPIPE, and a resulting dbus-daemon crash. This was always a problem, but was previously not seen due to performance issues with GNOME. git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@8187 df743ca5-7f9a-e211-a948-0013205c9059 --- x11/gnome-session/Makefile | 3 +- .../files/patch-gnome-session_gsm-dbus.c | 38 ++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 x11/gnome-session/files/patch-gnome-session_gsm-dbus.c (limited to 'x11') diff --git a/x11/gnome-session/Makefile b/x11/gnome-session/Makefile index 4e9c2c570..a5f20a814 100644 --- a/x11/gnome-session/Makefile +++ b/x11/gnome-session/Makefile @@ -3,11 +3,12 @@ # Whom: Joe Marcus Clarke # # $FreeBSD$ -# $MCom: ports/x11/gnome-session/Makefile,v 1.99 2006/12/01 21:04:59 marcus Exp $ +# $MCom: ports/x11/gnome-session/Makefile,v 1.100 2007/01/10 01:32:14 ahze Exp $ # PORTNAME= gnome-session PORTVERSION= 2.17.5 +PORTREVISION= 1 CATEGORIES= x11 gnome MASTER_SITES= ${MASTER_SITE_GNOME} \ ${MASTER_SITE_LOCAL:S/$/:local/} \ diff --git a/x11/gnome-session/files/patch-gnome-session_gsm-dbus.c b/x11/gnome-session/files/patch-gnome-session_gsm-dbus.c new file mode 100644 index 000000000..0a937937d --- /dev/null +++ b/x11/gnome-session/files/patch-gnome-session_gsm-dbus.c @@ -0,0 +1,38 @@ +--- gnome-session/gsm-dbus.c.orig Thu Jan 11 12:59:48 2007 ++++ gnome-session/gsm-dbus.c Thu Jan 11 13:00:47 2007 +@@ -281,6 +281,7 @@ start_parent (int address_fd, int pid_fd + int exitstat; + unsigned long tmp_num; + ssize_t bytes; ++ int i; + + g_assert (child > 0); + +@@ -326,17 +327,18 @@ start_parent (int address_fd, int pid_fd + /* + * Fetch dbus-daemon pid. + */ +- bytes = read_line (pid_fd, pid_str, sizeof (pid_str)); +- if (bytes == -1 || bytes == 0) ++ for (i = 0; i < 2; i++) + { +- close (address_fd); +- close (pid_fd); +- +- g_printerr ("Failed to get dbus-daemon's pid\n"); +- return; ++ bytes = read_line (pid_fd, pid_str, sizeof (pid_str)); ++ if (bytes == -1 || bytes == 0) ++ { ++ close (address_fd); ++ close (pid_fd); ++ ++ g_printerr ("Failed to get dbus-daemon's pid\n"); ++ return; ++ } + } +- +- bytes = read_line (pid_fd, pid_str, sizeof (pid_str)); + + close (address_fd); + close (pid_fd); -- cgit v1.2.3