2006-05-29 Marcus Brinkmann <marcus@g10code.de>
authorMarcus Brinkmann <mb@g10code.com>
Sun, 28 May 2006 23:42:23 +0000 (23:42 +0000)
committerMarcus Brinkmann <mb@g10code.com>
Sun, 28 May 2006 23:42:23 +0000 (23:42 +0000)
        * Makefile.am (EXTRA_DIST): Add
        patches/glib-2.9.2-wk1/03-gspawn-w32-fixup.patch and
        patches/glib-2.9.2-wk1/04-gspawn-w32-buffering.patch.
        * patches/glib-2.9.2-wk1/03-gspawn-w32-fixup.patch: New file.
        * patches/glib-2.9.2-wk1/04-gspawn-w32-buffering.patch: New file.

ChangeLog
Makefile.am
patches/glib-2.9.2-wk1/03-gspawn-w32-fixup.patch [new file with mode: 0755]
patches/glib-2.9.2-wk1/04-gspawn-w32-buffering.patch [new file with mode: 0755]

index 9263ba6..de62310 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-05-29  Marcus Brinkmann  <marcus@g10code.de>
+
+       * Makefile.am (EXTRA_DIST): Add
+       patches/glib-2.9.2-wk1/03-gspawn-w32-fixup.patch and
+       patches/glib-2.9.2-wk1/04-gspawn-w32-buffering.patch.
+       * patches/glib-2.9.2-wk1/03-gspawn-w32-fixup.patch: New file.
+       * patches/glib-2.9.2-wk1/04-gspawn-w32-buffering.patch: New file.
+
 2006-04-27  Marcus Brinkmann  <marcus@g10code.de>
 
        * src/Makefile.am (gpg4win_pkg_gnupg_post_install): New macro to
index e7f63bc..4aa0ab6 100644 (file)
@@ -30,5 +30,7 @@ EXTRA_DIST = autogen.sh README.SVN \
         patches/pthreads-w32-2-7-0-release/01-make.patch \
         patches/glib-2.9.2-wk1/01-giowin32.patch \
         patches/glib-2.9.2-wk1/02-gspawn-w32.patch \
+        patches/glib-2.9.2-wk1/03-gspawn-w32-fixup.patch \
+        patches/glib-2.9.2-wk1/04-gspawn-w32-buffering.patch \
        patches/sylpheed-claws-1.9.100cvs124/01-fix-plugin-dir.patch \
        patches/sylpheed-claws-1.9.100cvs124/02-std-plugins.patch
diff --git a/patches/glib-2.9.2-wk1/03-gspawn-w32-fixup.patch b/patches/glib-2.9.2-wk1/03-gspawn-w32-fixup.patch
new file mode 100755 (executable)
index 0000000..2445974
--- /dev/null
@@ -0,0 +1,65 @@
+#! /bin/sh
+patch -p1 -f $* < $0
+exit $?
+
+This patch is needed to complete 02-gspawn-w32.patch by Werner: When
+the complete path is used, it may contain spaces, and thus it needs to
+be quoted.
+
+2006-05-29  Marcus Brinkmann  <marcus@g10code.com>
+
+       * glib/gspawn-win32.c (do_spawn_with_pipes): Protect the first
+       argument by quotes.
+
+diff -ru glib-2.9.2-wk1-orig/glib/gspawn-win32.c glib-2.9.2-wk1/glib/gspawn-win32.c
+--- glib-2.9.2-wk1-orig/glib/gspawn-win32.c    2006-05-29 00:12:10.000000000 +0200
++++ glib-2.9.2-wk1/glib/gspawn-win32.c 2006-05-29 00:13:16.000000000 +0200
+@@ -696,7 +696,7 @@
+         helper_process = helper_process_buf; /* Yes, use that one. */
+     }
+-  new_argv[0] = helper_process;
++  new_argv[0] = protect_argv_string (helper_process);
+   _g_sprintf (args[ARG_CHILD_ERR_REPORT], "%d", child_err_report_pipe[1]);
+   new_argv[ARG_CHILD_ERR_REPORT] = args[ARG_CHILD_ERR_REPORT];
+   
+@@ -800,6 +800,7 @@
+         g_error_free (conv_error);
+         g_strfreev (protected_argv);
+         g_free (new_argv[ARG_WORKING_DIRECTORY]);
++        g_free (new_argv[0]);
+         g_free (new_argv);
+         g_free (whelper);
+         
+@@ -814,6 +815,7 @@
+         g_error_free (conv_error);
+         g_strfreev (protected_argv);
+         g_free (new_argv[ARG_WORKING_DIRECTORY]);
++        g_free (new_argv[0]);
+         g_free (new_argv);
+         g_free (whelper);
+         g_strfreev ((gchar **) wargv);
+@@ -855,6 +857,7 @@
+         g_error_free (conv_error);
+         g_strfreev (protected_argv);
+         g_free (new_argv[ARG_WORKING_DIRECTORY]);
++        g_free (new_argv[0]);
+         g_free (new_argv);
+         
+         return FALSE;
+@@ -868,6 +871,7 @@
+         g_error_free (conv_error);
+         g_strfreev (protected_argv);
+         g_free (new_argv[ARG_WORKING_DIRECTORY]);
++        g_free (new_argv[0]);
+         g_free (new_argv);
+         g_strfreev (cpargv);
+         
+@@ -899,6 +903,7 @@
+   g_strfreev (protected_argv);
+   g_free (new_argv[ARG_WORKING_DIRECTORY]);
++  g_free (new_argv[0]);
+   g_free (new_argv);
+   /* Check if gspawn-win32-helper couldn't be run */
diff --git a/patches/glib-2.9.2-wk1/04-gspawn-w32-buffering.patch b/patches/glib-2.9.2-wk1/04-gspawn-w32-buffering.patch
new file mode 100755 (executable)
index 0000000..e34ceba
--- /dev/null
@@ -0,0 +1,40 @@
+#! /bin/sh
+patch -p1 -f $* < $0
+exit $?
+
+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)
+
+--- glib-2.9.2-wk1/glib/gspawn-win32.c 2006-05-28 21:34:46.000000000 +0200
++++ glib/glib/gspawn-win32.c   2006-05-28 21:34:55.000000000 +0200
+@@ -1058,9 +1035,12 @@
+       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)
+@@ -1068,9 +1048,12 @@
+       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. */