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)
This commit is contained in:
Tor Lillqvist 2006-01-01 11:15:56 +00:00 committed by Tor Lillqvist
parent 8aa8d430d2
commit 07e1d54fb7
4 changed files with 30 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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. */