[jhbuild: 42/60] [gui] fix handling of child exit status



commit 0a1d197d4a808ce23b1dead3d8d41d03d87e2eb3
Author: Frédéric Péters <fpeters 0d be>
Date:   Thu May 21 22:17:20 2009 +0200

    [gui] fix handling of child exit status
---
 jhbuild/frontends/gtkui.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/jhbuild/frontends/gtkui.py b/jhbuild/frontends/gtkui.py
index 0eae83a..73313b0 100644
--- a/jhbuild/frontends/gtkui.py
+++ b/jhbuild/frontends/gtkui.py
@@ -475,7 +475,11 @@ class AppWindow(gtk.Window, buildscript.BuildScript):
                 if self.quit:
                     return
             self.child_pid = None
-            rc = self.vte_child_exit_status
+            if os.WIFEXITED(self.vte_child_exit_status):
+                rc = os.WEXITSTATUS(self.vte_child_exit_status)
+            elif os.WIFSIGNALED(self.vte_child_exit_status):
+                raise CommandError(_('%(command)s died with signal %(rc)s') % {
+                        'command': short_command, 'rc': os.WTERMSIG(rc)})
 
         if rc:
             raise CommandError(_('%(command)s returned with an error code (%(rc)s)') % {



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