diff mxtool/mx.py @ 4312:8dd27e218e19

Merge
author Lukas Stadler <lukas.stadler@jku.at>
date Thu, 19 Jan 2012 19:06:25 +0100
parents fad6f1ebeb44 d4906ea4255b
children 4023bae16d02
line wrap: on
line diff
--- a/mxtool/mx.py	Thu Jan 19 18:53:48 2012 +0100
+++ b/mxtool/mx.py	Thu Jan 19 19:06:25 2012 +0100
@@ -576,7 +576,7 @@
     if timeout is None and _opts.ptimeout != 0:
         timeout = _opts.ptimeout
 
-    global _currentSubprocess    
+    global _currentSubprocess
         
     try:
         # On Unix, the new subprocess should be in a separate group so that a timeout alarm
@@ -1629,6 +1629,9 @@
         abort('mx: unknown command \'{0}\'\n{1}use "mx help" for more options'.format(command, _format_commands()))
         
     c, _ = commands[command][:2]
+    def term_handler(signum, frame):
+        abort(1)
+    signal.signal(signal.SIGTERM, term_handler)
     try:
         if opts.timeout != 0:
             def alarm_handler(signum, frame):