[gnome-video-arcade] Correctly handle the (G_IO_IN | G_IO_HUP) case.
- From: Matthew Barnes <mbarnes src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-video-arcade] Correctly handle the (G_IO_IN | G_IO_HUP) case.
- Date: Mon, 6 Apr 2009 20:12:49 -0400 (EDT)
commit 7721e371982e374f92f0663b32e68c5a12c2769a
Author: Matthew Barnes <mbarnes redhat com>
Date: Mon Apr 6 20:12:14 2009 -0400
Correctly handle the (G_IO_IN | G_IO_HUP) case.
2009-04-06 Matthew Barnes <mbarnes redhat com>
* gva-process.c (process_stdout_ready):
Correctly handle the (G_IO_IN | G_IO_HUP) case.
---
ChangeLog | 5 +++++
src/gva-process.c | 5 +++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 981ee1b..c71fc7d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2009-04-06 Matthew Barnes <mbarnes redhat com>
+ * gva-process.c (process_stdout_ready):
+ Correctly handle the (G_IO_IN | G_IO_HUP) case.
+
+2009-04-06 Matthew Barnes <mbarnes redhat com>
+
* gva-process.c (process_read_line):
Remove the assertion before process_propagate_error(), since the
function can handle NULL GErrors. Hopefully this fixes a crash on
diff --git a/src/gva-process.c b/src/gva-process.c
index b6a2cea..56ef754 100644
--- a/src/gva-process.c
+++ b/src/gva-process.c
@@ -194,10 +194,11 @@ process_stdout_ready (GIOChannel *channel,
process->priv->stdout_lines,
signals[STDOUT_READY]);
- condition =
+ /* Break immediately if we have a G_IO_HUP. */
+ condition = (condition & G_IO_HUP) |
g_io_channel_get_buffer_condition (channel);
}
- while (condition & G_IO_IN);
+ while (condition == G_IO_IN);
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]