diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2013-01-04 23:50:12 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2013-01-04 23:50:12 +0800 |
commit | a2783c0a48318a88b1e72120d4fa6adad3b87e8f (patch) | |
tree | fcf485fdd6dd7107b455763711a40a081139a09a | |
parent | 74d08cb025075d9e01b800faa71a54dec53e65b4 (diff) | |
download | gsoc2013-evolution-a2783c0a48318a88b1e72120d4fa6adad3b87e8f.tar.gz gsoc2013-evolution-a2783c0a48318a88b1e72120d4fa6adad3b87e8f.tar.zst gsoc2013-evolution-a2783c0a48318a88b1e72120d4fa6adad3b87e8f.zip |
Bug 691133 - Evolution creates 'highlight' zombies
Evolution spawns the 'highlight' program with these flags:
G_SPAWN_SEARCH_PATH
G_SPAWN_DO_NOT_REAP_CHILD
G_SPAWN_DO_NOT_REAP_CHILD results in zombie 'highlight' processes.
Note, G_SPAWN_SEARCH_PATH is still needed on the gnome-3-6 branch.
In later versions we have configure determine the absolute path to
the 'highlight' program to avoid depending on the user's $PATH.
-rw-r--r-- | modules/text-highlight/e-mail-formatter-text-highlight.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/modules/text-highlight/e-mail-formatter-text-highlight.c b/modules/text-highlight/e-mail-formatter-text-highlight.c index e0a892cd20..3c71aead86 100644 --- a/modules/text-highlight/e-mail-formatter-text-highlight.c +++ b/modules/text-highlight/e-mail-formatter-text-highlight.c @@ -189,14 +189,14 @@ emfe_text_highlight_format (EMailFormatterExtension *extension, } else if (context->mode == E_MAIL_FORMATTER_MODE_RAW) { gint pipe_stdin, pipe_stdout; GPid pid; - CamelStream *read, *write, *utf8; CamelDataWrapper *dw; - gchar *font_family, *font_size, *syntax, *tmp; - GByteArray *ba; + gchar *font_family, *font_size, *syntax; gboolean use_custom_font; EShell *shell; EShellSettings *settings; PangoFontDescription *fd; + gboolean success; + const gchar *argv[] = { "highlight", NULL, /* --font= */ NULL, /* --font-size= */ @@ -258,11 +258,17 @@ emfe_text_highlight_format (EMailFormatterExtension *extension, argv[3] = g_strdup_printf ("--syntax=%s", syntax); g_free (syntax); - if (g_spawn_async_with_pipes ( - NULL, (gchar **) argv, NULL, - G_SPAWN_SEARCH_PATH | - G_SPAWN_DO_NOT_REAP_CHILD, - NULL, NULL, &pid, &pipe_stdin, &pipe_stdout, NULL, NULL)) { + success = g_spawn_async_with_pipes ( + NULL, (gchar **) argv, NULL, + G_SPAWN_SEARCH_PATH, NULL, NULL, &pid, + &pipe_stdin, &pipe_stdout, NULL, NULL); + + if (success) { + CamelStream *read; + CamelStream *write; + CamelStream *utf8; + GByteArray *ba; + gchar *tmp; write = camel_stream_fs_new_with_fd (pipe_stdin); read = camel_stream_fs_new_with_fd (pipe_stdout); |