[gnome-software/wip/temp/ubuntu-xenial-rebased: 38/329] Consume stderr from child processes so it doesn't show on the terminal



commit d19b25ea83efeec3d5bf7f3790c1f1b9b24c92fa
Author: Robert Ancell <robert ancell canonical com>
Date:   Fri Feb 5 12:42:14 2016 +1300

    Consume stderr from child processes so it doesn't show on the terminal

 src/plugins/gs-plugin-apt.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/plugins/gs-plugin-apt.c b/src/plugins/gs-plugin-apt.c
index 6942c8e..c9431b0 100644
--- a/src/plugins/gs-plugin-apt.c
+++ b/src/plugins/gs-plugin-apt.c
@@ -108,7 +108,7 @@ gs_plugin_refine (GsPlugin *plugin,
        GList *link;
        GPtrArray *dpkg_argv_array, *cache_argv_array;
        gboolean known_apps = FALSE;
-       g_autofree gchar *dpkg_output = NULL, *cache_output = NULL, **dpkg_argv = NULL, **cache_argv = NULL;
+       g_autofree gchar **dpkg_argv = NULL, **cache_argv = NULL, *dpkg_stdout = NULL, *cache_stdout = NULL, 
*dpkg_stderr = NULL, *cache_stderr = NULL;
 
        g_printerr ("APT: gs_plugin_refine");
        for (link = *list; link; link = link->next) {
@@ -154,13 +154,13 @@ gs_plugin_refine (GsPlugin *plugin,
        if (!known_apps)
                return TRUE;
 
-       if (!g_spawn_sync (NULL, dpkg_argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, &dpkg_output, NULL, NULL, 
error))
+       if (!g_spawn_sync (NULL, dpkg_argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, &dpkg_stdout, 
&dpkg_stderr, NULL, error))
                return FALSE;
-       if (!g_spawn_sync (NULL, cache_argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, &cache_output, NULL, 
NULL, error))
+       if (!g_spawn_sync (NULL, cache_argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, &cache_stdout, 
&cache_stderr, NULL, error))
                return FALSE;
 
-       parse_package_info (dpkg_output, flags, list);
-       parse_package_info (cache_output, flags, list);
+       parse_package_info (dpkg_stdout, flags, list);
+       parse_package_info (cache_stdout, flags, list);
 
        return TRUE;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]