]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[1673] Output the signal name even when the process dumps core
authorMukund Sivaraman <muks@isc.org>
Wed, 7 Mar 2012 04:22:50 +0000 (09:52 +0530)
committerMukund Sivaraman <muks@isc.org>
Thu, 8 Mar 2012 04:00:28 +0000 (09:30 +0530)
src/lib/python/isc/bind10/component.py

index c767b7da20466d9e4d556e56066fd26bb50940aa..b854743974452eddfafcafcef9a4668653f3a722 100644 (file)
@@ -227,11 +227,11 @@ class BaseComponent:
                 signame = get_signame(sig)
                 exit_str = "process stopped with exit status %d (killed by signal %d: %s)" % (exit_code, sig, signame)
             elif os.WIFSIGNALED(exit_code):
+                sig = os.WTERMSIG(exit_code)
+                signame = get_signame(sig)
                 if os.WCOREDUMP(exit_code):
-                    exit_str = "process dumped core with exit status %d" % (exit_code)
+                    exit_str = "process dumped core with exit status %d (killed by signal %d: %s)" % (exit_code, sig, signame)
                 else:
-                    sig = os.WTERMSIG(exit_code)
-                    signame = get_signame(sig)
                     exit_str = "process terminated with exit status %d (killed by signal %d: %s)" % (exit_code, sig, signame)
             else:
                 exit_str = "unknown condition with exit status %d" % (exit_code)