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



commit 1eeb94f4adf8d619300af7ef5b3c46bf74aab2e7
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]