[gnome-terminal] Return error exit code when handling options fails
- From: Christian Persch <chpe src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-terminal] Return error exit code when handling options fails
- Date: Sun, 23 Aug 2009 20:07:08 +0000 (UTC)
commit 1202cf7bbeb0b90702c60ba5e02ad6042cd92345
Author: Christian Persch <chpe gnome org>
Date: Sun Aug 23 22:06:38 2009 +0200
Return error exit code when handling options fails
src/terminal.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/terminal.c b/src/terminal.c
index 42eb23f..01dfa8d 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -253,6 +253,7 @@ main (int argc, char **argv)
guint32 request_name_ret;
GError *error = NULL;
const char *home_dir;
+ int ret = EXIT_SUCCESS;
setlocale (LC_ALL, "");
@@ -369,7 +370,6 @@ main (int argc, char **argv)
GArray *working_directory_array, *display_name_array, *startup_id_array;
GArray *env_array, *argv_array;
gboolean retval;
- int ret = EXIT_SUCCESS;
_terminal_debug_print (TERMINAL_DEBUG_FACTORY,
"Forwarding arguments to existing instance\n");
@@ -488,6 +488,8 @@ factory_disabled:
{
g_printerr ("Error handling options: %s\n", error->message);
g_clear_error (&error);
+
+ ret = EXIT_FAILURE;
goto shutdown;
}
@@ -508,7 +510,7 @@ shutdown:
if (factory)
g_object_unref (factory);
- return 0;
+ return ret;
}
/* Factory stuff */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]