Browse Source

[1673] Output the signal name even when the process dumps core

Mukund Sivaraman 13 years ago
parent
commit
3adabc6a1e
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/lib/python/isc/bind10/component.py

+ 3 - 3
src/lib/python/isc/bind10/component.py

@@ -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)