[anjuta] Fix crash when launching nonexistant program
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] Fix crash when launching nonexistant program
- Date: Mon, 3 Feb 2014 22:47:44 +0000 (UTC)
commit 8b79bf7ba3fbf485ff1d9846955e20440aaadf66
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]