pango r2620 - in trunk: . pango-view
- From: behdad svn gnome org
- To: svn-commits-list gnome org
- Subject: pango r2620 - in trunk: . pango-view
- Date: Mon, 28 Apr 2008 17:42:55 +0100 (BST)
Author: behdad
Date: Mon Apr 28 16:42:55 2008
New Revision: 2620
URL: http://svn.gnome.org/viewvc/pango?rev=2620&view=rev
Log:
2008-04-28 Behdad Esfahbod <behdad gnome org>
* pango-view/viewer-main.c (main): Wait for convert(1) to finish.
Patch by Jamie Guinan.
Modified:
trunk/ChangeLog
trunk/pango-view/viewer-main.c
Modified: trunk/pango-view/viewer-main.c
==============================================================================
--- trunk/pango-view/viewer-main.c (original)
+++ trunk/pango-view/viewer-main.c Mon Apr 28 16:42:55 2008
@@ -69,6 +69,7 @@
else
{
FILE *stream;
+ GPid pid = 0;
if (view->write_suffix && g_str_has_suffix (opt_output, view->write_suffix))
{
@@ -86,15 +87,20 @@
convert_argv[2] = opt_output;
if (!g_spawn_async_with_pipes (NULL, (gchar **)convert_argv, NULL,
+ G_SPAWN_DO_NOT_REAP_CHILD |
G_SPAWN_SEARCH_PATH |
G_SPAWN_STDOUT_TO_DEV_NULL |
G_SPAWN_STDERR_TO_DEV_NULL,
- NULL, NULL, NULL, &fd, NULL, NULL, &error))
+ NULL, NULL, &pid, &fd, NULL, NULL, &error))
fail ("When running ImageMagick 'convert' command: %s\n", error->message);
stream = fdopen (fd, "wb");
}
view->write (instance, surface, stream, width, height);
fclose (stream);
+#ifdef G_OS_UNIX
+ if (pid)
+ waitpid (pid, NULL, 0);
+#endif
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]