+2002-02-19 Tor Lillqvist <tml@iki.fi>
+
+ * glib/gspawn-win32.c: Include <config.h> first here, too. Use
+ g_io_channel_read_chars() instead of (deprecated)
+ g_io_channel_read(). Set encoding to NULL for the channels used
+ for the pipes from the child.
+
+ * glib/giowin32.c (buffer_read): Do return G_IO_STATUS_EOF when
+ EOF has been reached. Otherwise, with the above change to
+ gspawn-win32.c, spawn-test hangs.
+
Mon Feb 18 20:18:23 2002 Owen Taylor <otaylor@redhat.com>
* glib/libcharset/Makefile.am (EXTRA_DIST): Remove
+2002-02-19 Tor Lillqvist <tml@iki.fi>
+
+ * glib/gspawn-win32.c: Include <config.h> first here, too. Use
+ g_io_channel_read_chars() instead of (deprecated)
+ g_io_channel_read(). Set encoding to NULL for the channels used
+ for the pipes from the child.
+
+ * glib/giowin32.c (buffer_read): Do return G_IO_STATUS_EOF when
+ EOF has been reached. Otherwise, with the above change to
+ gspawn-win32.c, spawn-test hangs.
+
Mon Feb 18 20:18:23 2002 Owen Taylor <otaylor@redhat.com>
* glib/libcharset/Makefile.am (EXTRA_DIST): Remove
+2002-02-19 Tor Lillqvist <tml@iki.fi>
+
+ * glib/gspawn-win32.c: Include <config.h> first here, too. Use
+ g_io_channel_read_chars() instead of (deprecated)
+ g_io_channel_read(). Set encoding to NULL for the channels used
+ for the pipes from the child.
+
+ * glib/giowin32.c (buffer_read): Do return G_IO_STATUS_EOF when
+ EOF has been reached. Otherwise, with the above change to
+ gspawn-win32.c, spawn-test hangs.
+
Mon Feb 18 20:18:23 2002 Owen Taylor <otaylor@redhat.com>
* glib/libcharset/Makefile.am (EXTRA_DIST): Remove
+2002-02-19 Tor Lillqvist <tml@iki.fi>
+
+ * glib/gspawn-win32.c: Include <config.h> first here, too. Use
+ g_io_channel_read_chars() instead of (deprecated)
+ g_io_channel_read(). Set encoding to NULL for the channels used
+ for the pipes from the child.
+
+ * glib/giowin32.c (buffer_read): Do return G_IO_STATUS_EOF when
+ EOF has been reached. Otherwise, with the above change to
+ gspawn-win32.c, spawn-test hangs.
+
Mon Feb 18 20:18:23 2002 Owen Taylor <otaylor@redhat.com>
* glib/libcharset/Makefile.am (EXTRA_DIST): Remove
+2002-02-19 Tor Lillqvist <tml@iki.fi>
+
+ * glib/gspawn-win32.c: Include <config.h> first here, too. Use
+ g_io_channel_read_chars() instead of (deprecated)
+ g_io_channel_read(). Set encoding to NULL for the channels used
+ for the pipes from the child.
+
+ * glib/giowin32.c (buffer_read): Do return G_IO_STATUS_EOF when
+ EOF has been reached. Otherwise, with the above change to
+ gspawn-win32.c, spawn-test hangs.
+
Mon Feb 18 20:18:23 2002 Owen Taylor <otaylor@redhat.com>
* glib/libcharset/Makefile.am (EXTRA_DIST): Remove
+2002-02-19 Tor Lillqvist <tml@iki.fi>
+
+ * glib/gspawn-win32.c: Include <config.h> first here, too. Use
+ g_io_channel_read_chars() instead of (deprecated)
+ g_io_channel_read(). Set encoding to NULL for the channels used
+ for the pipes from the child.
+
+ * glib/giowin32.c (buffer_read): Do return G_IO_STATUS_EOF when
+ EOF has been reached. Otherwise, with the above change to
+ gspawn-win32.c, spawn-test hangs.
+
Mon Feb 18 20:18:23 2002 Owen Taylor <otaylor@redhat.com>
* glib/libcharset/Makefile.am (EXTRA_DIST): Remove
+2002-02-19 Tor Lillqvist <tml@iki.fi>
+
+ * glib/gspawn-win32.c: Include <config.h> first here, too. Use
+ g_io_channel_read_chars() instead of (deprecated)
+ g_io_channel_read(). Set encoding to NULL for the channels used
+ for the pipes from the child.
+
+ * glib/giowin32.c (buffer_read): Do return G_IO_STATUS_EOF when
+ EOF has been reached. Otherwise, with the above change to
+ gspawn-win32.c, spawn-test hangs.
+
Mon Feb 18 20:18:23 2002 Owen Taylor <otaylor@redhat.com>
* glib/libcharset/Makefile.am (EXTRA_DIST): Remove
+2002-02-19 Tor Lillqvist <tml@iki.fi>
+
+ * glib/gspawn-win32.c: Include <config.h> first here, too. Use
+ g_io_channel_read_chars() instead of (deprecated)
+ g_io_channel_read(). Set encoding to NULL for the channels used
+ for the pipes from the child.
+
+ * glib/giowin32.c (buffer_read): Do return G_IO_STATUS_EOF when
+ EOF has been reached. Otherwise, with the above change to
+ gspawn-win32.c, spawn-test hangs.
+
Mon Feb 18 20:18:23 2002 Owen Taylor <otaylor@redhat.com>
* glib/libcharset/Makefile.am (EXTRA_DIST): Remove
LOCK (channel->mutex);
if (channel->wrp == channel->rdp && !channel->running)
{
+ if (channel->debug)
+ g_print ("wrp==rdp, !running\n");
UNLOCK (channel->mutex);
*bytes_read = 0;
- return G_IO_STATUS_NORMAL; /* as before, normal case ? */
+ return G_IO_STATUS_EOF;
}
}
/* Define this to get some logging all the time */
/* #define G_SPAWN_WIN32_DEBUG */
+#include <config.h>
+
#include "glib.h"
#include <string.h>
GIOChannel *iochannel,
GError **error)
{
- GIOError gioerror;
+ GIOStatus giostatus;
gint bytes;
gchar buf[4096];
again:
- gioerror = g_io_channel_read (iochannel, buf, sizeof (buf), &bytes);
+ giostatus = g_io_channel_read_chars (iochannel, buf, sizeof (buf), &bytes, NULL);
if (bytes == 0)
return READ_EOF;
g_string_append_len (str, buf, bytes);
return READ_OK;
}
- else if (gioerror == G_IO_ERROR_AGAIN)
+ else if (giostatus == G_IO_STATUS_AGAIN)
goto again;
- else if (gioerror != G_IO_ERROR_NONE)
+ else if (giostatus == G_IO_STATUS_ERROR)
{
g_set_error (error,
G_SPAWN_ERROR,
{
outstr = g_string_new ("");
outchannel = g_io_channel_win32_new_fd (outpipe);
+ g_io_channel_set_encoding (outchannel, NULL, NULL);
g_io_channel_win32_make_pollfd (outchannel,
G_IO_IN | G_IO_ERR | G_IO_HUP,
&outfd);
{
errstr = g_string_new ("");
errchannel = g_io_channel_win32_new_fd (errpipe);
+ g_io_channel_set_encoding (errchannel, NULL, NULL);
g_io_channel_win32_make_pollfd (errchannel,
G_IO_IN | G_IO_ERR | G_IO_HUP,
&errfd);