[gnome-terminal] client: Fix exit codes



commit 08730b8f03f94996794a00616d3dbe57d7f72e5b
Author: Christian Persch <chpe gnome org>
Date:   Sun May 27 14:27:24 2012 +0200

    client: Fix exit codes
    
    Don't signal if the child process signalled, but instead use 127 + signum
    as exit value. That's what bash does, too.

 src/client.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/client.c b/src/client.c
index 0668eeb..aeea712 100644
--- a/src/client.c
+++ b/src/client.c
@@ -907,9 +907,9 @@ main (gint argc, gchar *argv[])
     if (WIFEXITED (exit_code))
       return WEXITSTATUS (exit_code);
     else if (WIFSIGNALED (exit_code))
-      raise (WTERMSIG (exit_code));
+      return 128 + (WTERMSIG (exit_code));
     else
-      return 255;
+      return 127;
   }
 
   return ret;



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