[anjuta/gnome-3-10] Fix crash when launching nonexistant program



commit d90205806cc57d92adf78109762a46a93ef1c448
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Sun Feb 2 21:08:27 2014 -0600

    Fix crash when launching nonexistant program
    
    The crash is in a subprocess, but it will be picked up by distro bug
    reporting tools like ABRT.
    
    The problem is a bad use of g_error(), which is always fatal and so
    should be reserved for programming errors.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=723509

 launcher/anjuta-launcher.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/launcher/anjuta-launcher.c b/launcher/anjuta-launcher.c
index 64e4b2f..a6bafd9 100644
--- a/launcher/anjuta-launcher.c
+++ b/launcher/anjuta-launcher.c
@@ -104,7 +104,8 @@ main (int argc, char **argv)
        if ((pid = fork ()) == 0)
        {
                execvp (argv[1], arg_v);
-               g_error ("Unable to execute the command (not found)\n");
+               printf ("Unable to execute the command (not found)\n");
+               exit (-1);
        }
        if (pid < 0)
        {


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