Re: [ADMIN] server process (PID xxx) was

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [ADMIN] server process (PID xxx) was
Дата
Msg-id 200701292021.l0TKLtR16529@momjian.us
обсуждение исходный текст
Ответ на Re: [ADMIN] server process (PID xxx) was terminated by signal  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-patches
Peter Eisentraut wrote:
> Tom Lane wrote:
> > I don't like that because it parenthesizes the most important part of
> > the message, which is a style-guideline violation at least in spirit.
> > How about
> >
> >         ... terminated by signal 10: Bus error
>
> I like that.

Patch attached and applied;  new message from exec.c and postmaster.c:

  LOG:  server process (PID 27744) was terminated by signal 10: Bus error

Nice!

--
  Bruce Momjian   bruce@momjian.us
  EnterpriseDB    http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +
Index: src/backend/postmaster/postmaster.c
===================================================================
RCS file: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v
retrieving revision 1.515
diff -c -c -r1.515 postmaster.c
*** src/backend/postmaster/postmaster.c    28 Jan 2007 06:32:03 -0000    1.515
--- src/backend/postmaster/postmaster.c    28 Jan 2007 22:18:25 -0000
***************
*** 2436,2446 ****
          /*------
            translator: %s is a noun phrase describing a child process, such as
            "server process" */
!                 (errmsg("%s (PID %d) was terminated by signal %s (%d)",
!                         procname, pid,
                          WTERMSIG(exitstatus) < NSIG ?
!                         sys_siglist[WTERMSIG(exitstatus)] : "(unknown)",
!                         WTERMSIG(exitstatus))));
  #else
          ereport(lev,

--- 2436,2445 ----
          /*------
            translator: %s is a noun phrase describing a child process, such as
            "server process" */
!                 (errmsg("%s (PID %d) was terminated by signal %d: %s",
!                         procname, pid, WTERMSIG(exitstatus),
                          WTERMSIG(exitstatus) < NSIG ?
!                         sys_siglist[WTERMSIG(exitstatus)] : "(unknown)")));
  #else
          ereport(lev,

Index: src/port/exec.c
===================================================================
RCS file: /cvsroot/pgsql/src/port/exec.c,v
retrieving revision 1.53
diff -c -c -r1.53 exec.c
*** src/port/exec.c    28 Jan 2007 07:29:32 -0000    1.53
--- src/port/exec.c    28 Jan 2007 22:18:27 -0000
***************
*** 587,595 ****
          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)");
  #else
          log_error(_("child process was terminated by signal %d"),
                    WTERMSIG(exitstatus));
--- 587,600 ----
          log_error(_("child process was terminated by exception 0x%X"),
                    WTERMSIG(exitstatus));
  #elif defined(HAVE_DECL_SYS_SIGLIST) && HAVE_DECL_SYS_SIGLIST
!     {
!         char str[256];
!
!         snprintf(str, sizeof(str), "%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));

В списке pgsql-patches по дате отправления:

Предыдущее
От:
Дата:
Сообщение: Fixed shared_preload_libraries on Win32
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [ADMIN] server process (PID xxx) was