[glib/wip/gcleanup: 1/10] gbacktrace: Don't close stderr when running gdb



commit ce0d81fbedf337a1812158c27425caf5ac1d4744
Author: Stef Walter <stefw gnome org>
Date:   Tue Oct 29 18:03:29 2013 +0100

    gbacktrace: Don't close stderr when running gdb
    
    We want to see error messages related to starting and running
    gdb (such as if it's not installed).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=711088

 glib/gbacktrace.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/glib/gbacktrace.c b/glib/gbacktrace.c
index 4d19d6f..2f447a4 100644
--- a/glib/gbacktrace.c
+++ b/glib/gbacktrace.c
@@ -300,10 +300,9 @@ stack_trace (char **args)
     {
       close (0); dup (in_fd[0]);   /* set the stdin to the in pipe */
       close (1); dup (out_fd[1]);  /* set the stdout to the out pipe */
-      close (2); dup (out_fd[1]);  /* set the stderr to the out pipe */
 
       execvp (args[0], args);      /* exec gdb */
-      perror ("exec failed");
+      perror ("exec gdb failed");
       _exit (0);
     }
   else if (pid == (pid_t) -1)


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