diff options
author | marcus <marcus@FreeBSD.org> | 2005-05-12 21:18:17 +0800 |
---|---|---|
committer | marcus <marcus@FreeBSD.org> | 2005-05-12 21:18:17 +0800 |
commit | 9a8a7477fcff11892a49c1e7cf92d9f0fbd40387 (patch) | |
tree | 836b7c604fdedc1d7122517d692b80e1b1a74635 /x11 | |
parent | 6113e069402153f6818e1b6c958ceed7c8100b76 (diff) | |
download | freebsd-ports-graphics-9a8a7477fcff11892a49c1e7cf92d9f0fbd40387.tar.gz freebsd-ports-graphics-9a8a7477fcff11892a49c1e7cf92d9f0fbd40387.tar.zst freebsd-ports-graphics-9a8a7477fcff11892a49c1e7cf92d9f0fbd40387.zip |
Fix an infinite loop that can occur when gnome-session attempts a logout.
What happens is gdm gets locked in a tight loop forever reading, but
never processing, the EOF from the IPC socket.
PR: 80906 (amongst others)
Diffstat (limited to 'x11')
-rw-r--r-- | x11/gdm/Makefile | 1 | ||||
-rw-r--r-- | x11/gdm/files/patch-daemon_gdm-net.c | 42 |
2 files changed, 43 insertions, 0 deletions
diff --git a/x11/gdm/Makefile b/x11/gdm/Makefile index 7cfdbd65f11..27e6e8de601 100644 --- a/x11/gdm/Makefile +++ b/x11/gdm/Makefile @@ -7,6 +7,7 @@ PORTNAME= gdm PORTVERSION= 2.6.0.9 +PORTREVISION= 1 CATEGORIES= x11 gnome MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= sources/${PORTNAME:S/2$//}/2.6 diff --git a/x11/gdm/files/patch-daemon_gdm-net.c b/x11/gdm/files/patch-daemon_gdm-net.c new file mode 100644 index 00000000000..caf221d7c95 --- /dev/null +++ b/x11/gdm/files/patch-daemon_gdm-net.c @@ -0,0 +1,42 @@ +--- daemon/gdm-net.c.orig Thu May 12 01:00:31 2005 ++++ daemon/gdm-net.c Thu May 12 01:00:36 2005 +@@ -76,14 +76,14 @@ struct _GdmConnection { + }; + + static gboolean +-close_if_needed (GdmConnection *conn, GIOCondition cond) ++close_if_needed (GdmConnection *conn, GIOCondition cond, gboolean error) + { + /* non-subconnections are never closed */ + if (conn->parent == NULL) + return TRUE; + + if (cond & G_IO_ERR || +- cond & G_IO_HUP) { ++ cond & G_IO_HUP || error) { + gdm_debug ("close_if_needed: Got HUP/ERR on %d", conn->fd); + conn->source = 0; + gdm_connection_close (conn); +@@ -103,11 +103,11 @@ gdm_connection_handler (GIOChannel *sour + size_t len; + + if ( ! (cond & G_IO_IN)) +- return close_if_needed (conn, cond); ++ return close_if_needed (conn, cond, FALSE); + + VE_IGNORE_EINTR (len = read (conn->fd, buf, sizeof (buf) -1)); + if (len <= 0) { +- return close_if_needed (conn, cond); ++ return close_if_needed (conn, cond, TRUE); + } + + buf[len] = '\0'; +@@ -141,7 +141,7 @@ gdm_connection_handler (GIOChannel *sour + } + } + +- return close_if_needed (conn, cond); ++ return close_if_needed (conn, cond, FALSE); + } + + gboolean |