diff options
author | Bruce Momjian | 2007-01-29 20:17:40 +0000 |
---|---|---|
committer | Bruce Momjian | 2007-01-29 20:17:40 +0000 |
commit | 5b4fa959846abf9e95798a39326e56fd7dc27d43 (patch) | |
tree | d844bb8a3d11627c8427e9b072ec01701db22e05 /src/port/exec.c | |
parent | 48ba3f5711aab5bd8f009aa9da8687bc465cdc21 (diff) |
Update process termination message to display signal number and name
from exec.c and postmaster.c.
Diffstat (limited to 'src/port/exec.c')
-rw-r--r-- | src/port/exec.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/port/exec.c b/src/port/exec.c index 26294cdf4a2..e92dbde1a29 100644 --- a/src/port/exec.c +++ b/src/port/exec.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/port/exec.c,v 1.53 2007/01/28 07:29:32 tgl Exp $ + * $PostgreSQL: pgsql/src/port/exec.c,v 1.54 2007/01/29 20:17:40 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -587,9 +587,14 @@ pclose_check(FILE *stream) log_error(_("child process was terminated by exception 0x%X"), WTERMSIG(exitstatus)); #elif defined(HAVE_DECL_SYS_SIGLIST) && HAVE_DECL_SYS_SIGLIST - log_error(_("child process was terminated by signal %s"), - WTERMSIG(exitstatus) < NSIG ? - sys_siglist[WTERMSIG(exitstatus)] : "(unknown)"); + { + char str[256]; + + snprintf(str, 256, "%d: %s", WTERMSIG(exitstatus), + WTERMSIG(exitstatus) < NSIG ? + sys_siglist[WTERMSIG(exitstatus)] : "(unknown)"); + log_error(_("child process was terminated by signal %s"), str); + } #else log_error(_("child process was terminated by signal %d"), WTERMSIG(exitstatus)); |