diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2013-01-04 23:37:29 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2013-01-04 23:45:17 +0800 |
commit | 7f93dcab4da166aed3a0ad8e8d3b997b3a3b8b94 (patch) | |
tree | 280ecfdde1080391e695dd81b668aabd366ac4cf /modules | |
parent | 66b44d41d17cc38c76c9ffaeeac9d7ded76bfe45 (diff) | |
download | gsoc2013-evolution-7f93dcab4da166aed3a0ad8e8d3b997b3a3b8b94.tar gsoc2013-evolution-7f93dcab4da166aed3a0ad8e8d3b997b3a3b8b94.tar.gz gsoc2013-evolution-7f93dcab4da166aed3a0ad8e8d3b997b3a3b8b94.tar.bz2 gsoc2013-evolution-7f93dcab4da166aed3a0ad8e8d3b997b3a3b8b94.tar.lz gsoc2013-evolution-7f93dcab4da166aed3a0ad8e8d3b997b3a3b8b94.tar.xz gsoc2013-evolution-7f93dcab4da166aed3a0ad8e8d3b997b3a3b8b94.tar.zst gsoc2013-evolution-7f93dcab4da166aed3a0ad8e8d3b997b3a3b8b94.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_SEARCH_PATH is not needed because configure already determines
the absolute path to the 'highlight' program. G_SPAWN_DO_NOT_REAP_CHILD
results in zombie 'highlight' processes. Remove both flags.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/text-highlight/e-mail-formatter-text-highlight.c | 21 |
1 files changed, 13 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 dd5ed1d4d5..d180d60af7 100644 --- a/modules/text-highlight/e-mail-formatter-text-highlight.c +++ b/modules/text-highlight/e-mail-formatter-text-highlight.c @@ -175,14 +175,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_COMMAND, NULL, /* --font= */ NULL, /* --font-size= */ @@ -244,11 +244,16 @@ 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, 0, 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); |