diff options
author | Behdad Esfahbod <behdad@gnome.org> | 2008-04-28 16:42:55 +0000 |
---|---|---|
committer | Behdad Esfahbod <behdad@src.gnome.org> | 2008-04-28 16:42:55 +0000 |
commit | 114ff6636b3bb7041273bf39bb29929944d55120 (patch) | |
tree | 90e092c1604769ba505cf2adc18ba8a8af7f625d | |
parent | d6af99f861a79474cb291fbb41e21413343a3ee9 (diff) | |
download | pango-114ff6636b3bb7041273bf39bb29929944d55120.tar.gz |
Wait for convert(1) to finish. Patch by Jamie Guinan.
2008-04-28 Behdad Esfahbod <behdad@gnome.org>
* pango-view/viewer-main.c (main): Wait for convert(1) to finish.
Patch by Jamie Guinan.
svn path=/trunk/; revision=2620
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | pango-view/viewer-main.c | 8 |
2 files changed, 12 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2008-04-28 Behdad Esfahbod <behdad@gnome.org> + + * pango-view/viewer-main.c (main): Wait for convert(1) to finish. + Patch by Jamie Guinan. + 2008-04-24 Behdad Esfahbod <behdad@gnome.org> Part of Bug 97545 – Make pango_default_break follow Unicode TR #29 diff --git a/pango-view/viewer-main.c b/pango-view/viewer-main.c index f3d93df4..3388e410 100644 --- a/pango-view/viewer-main.c +++ b/pango-view/viewer-main.c @@ -69,6 +69,7 @@ main (int argc, else { FILE *stream; + GPid pid = 0; if (view->write_suffix && g_str_has_suffix (opt_output, view->write_suffix)) { @@ -86,15 +87,20 @@ main (int argc, 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 } } |