summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@novell.com>2006-01-01 11:15:56 +0000
committerTor Lillqvist <tml@src.gnome.org>2006-01-01 11:15:56 +0000
commit07e1d54fb726583c6733a10d6570126045b0d99d (patch)
tree5dacde9f3788c39c7b51ab9efa7ed4eb5acba91b
parent8aa8d430d2bba29b4ae4d9040a87efc935df9520 (diff)
downloadglib-07e1d54fb726583c6733a10d6570126045b0d99d.tar.gz
Set the GIOChannels for stdout and stderr to unbuffered. Otherwise the
2006-01-01 Tor Lillqvist <tml@novell.com> * glib/gspawn-win32.c (g_spawn_sync_utf8): Set the GIOChannels for stdout and stderr to unbuffered. Otherwise the giochannel layer will try to read from them regardless whether the g_io_channel_win32_poll() call here has indicated readability or not. (#325310)
-rw-r--r--ChangeLog8
-rw-r--r--ChangeLog.pre-2-108
-rw-r--r--ChangeLog.pre-2-128
-rw-r--r--glib/gspawn-win32.c6
4 files changed, 30 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 8faed1a34..3ebe056e1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-01-01 Tor Lillqvist <tml@novell.com>
+
+ * glib/gspawn-win32.c (g_spawn_sync_utf8): Set the GIOChannels for
+ stdout and stderr to unbuffered. Otherwise the giochannel layer
+ will try to read from them regardless whether the
+ g_io_channel_win32_poll() call here has indicated
+ readability or not. (#325310)
+
2005-12-29 Matthias Clasen <mclasen@redhat.com>
* glib/gutils.c (glib_check_version): Fix a copy-and-paste error
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 8faed1a34..3ebe056e1 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,11 @@
+2006-01-01 Tor Lillqvist <tml@novell.com>
+
+ * glib/gspawn-win32.c (g_spawn_sync_utf8): Set the GIOChannels for
+ stdout and stderr to unbuffered. Otherwise the giochannel layer
+ will try to read from them regardless whether the
+ g_io_channel_win32_poll() call here has indicated
+ readability or not. (#325310)
+
2005-12-29 Matthias Clasen <mclasen@redhat.com>
* glib/gutils.c (glib_check_version): Fix a copy-and-paste error
diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12
index 8faed1a34..3ebe056e1 100644
--- a/ChangeLog.pre-2-12
+++ b/ChangeLog.pre-2-12
@@ -1,3 +1,11 @@
+2006-01-01 Tor Lillqvist <tml@novell.com>
+
+ * glib/gspawn-win32.c (g_spawn_sync_utf8): Set the GIOChannels for
+ stdout and stderr to unbuffered. Otherwise the giochannel layer
+ will try to read from them regardless whether the
+ g_io_channel_win32_poll() call here has indicated
+ readability or not. (#325310)
+
2005-12-29 Matthias Clasen <mclasen@redhat.com>
* glib/gutils.c (glib_check_version): Fix a copy-and-paste error
diff --git a/glib/gspawn-win32.c b/glib/gspawn-win32.c
index 56af86d71..0d227990b 100644
--- a/glib/gspawn-win32.c
+++ b/glib/gspawn-win32.c
@@ -1038,9 +1038,12 @@ g_spawn_sync_utf8 (const gchar *working_directory,
outstr = g_string_new (NULL);
outchannel = g_io_channel_win32_new_fd (outpipe);
g_io_channel_set_encoding (outchannel, NULL, NULL);
+ g_io_channel_set_buffered (outchannel, FALSE);
g_io_channel_win32_make_pollfd (outchannel,
G_IO_IN | G_IO_ERR | G_IO_HUP,
&outfd);
+ if (debug)
+ g_print ("outfd=%x\n", outfd.fd);
}
if (errpipe >= 0)
@@ -1048,9 +1051,12 @@ g_spawn_sync_utf8 (const gchar *working_directory,
errstr = g_string_new (NULL);
errchannel = g_io_channel_win32_new_fd (errpipe);
g_io_channel_set_encoding (errchannel, NULL, NULL);
+ g_io_channel_set_buffered (errchannel, FALSE);
g_io_channel_win32_make_pollfd (errchannel,
G_IO_IN | G_IO_ERR | G_IO_HUP,
&errfd);
+ if (debug)
+ g_print ("errfd=%x\n", errfd.fd);
}
/* Read data until we get EOF on all pipes. */