Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5b4fa95

Browse files
committed
Update process termination message to display signal number and name
from exec.c and postmaster.c.
1 parent48ba3f5 commit5b4fa95

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

‎src/backend/postmaster/postmaster.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
*
3838
*
3939
* IDENTIFICATION
40-
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.515 2007/01/28 06:32:03 tgl Exp $
40+
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.516 2007/01/29 20:17:40 momjian Exp $
4141
*
4242
* NOTES
4343
*
@@ -2436,11 +2436,10 @@ LogChildExit(int lev, const char *procname, int pid, int exitstatus)
24362436
/*------
24372437
translator: %s is a noun phrase describing a child process, such as
24382438
"server process" */
2439-
(errmsg("%s (PID %d) was terminated by signal %s (%d)",
2440-
procname,pid,
2439+
(errmsg("%s (PID %d) was terminated by signal %d: %s",
2440+
procname,pid,WTERMSIG(exitstatus),
24412441
WTERMSIG(exitstatus)<NSIG ?
2442-
sys_siglist[WTERMSIG(exitstatus)] :"(unknown)",
2443-
WTERMSIG(exitstatus))));
2442+
sys_siglist[WTERMSIG(exitstatus)] :"(unknown)")));
24442443
#else
24452444
ereport(lev,
24462445

‎src/port/exec.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $PostgreSQL: pgsql/src/port/exec.c,v 1.53 2007/01/28 07:29:32 tgl Exp $
12+
* $PostgreSQL: pgsql/src/port/exec.c,v 1.54 2007/01/29 20:17:40 momjian Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -587,9 +587,14 @@ pclose_check(FILE *stream)
587587
log_error(_("child process was terminated by exception 0x%X"),
588588
WTERMSIG(exitstatus));
589589
#elif defined(HAVE_DECL_SYS_SIGLIST)&&HAVE_DECL_SYS_SIGLIST
590-
log_error(_("child process was terminated by signal %s"),
591-
WTERMSIG(exitstatus)<NSIG ?
592-
sys_siglist[WTERMSIG(exitstatus)] :"(unknown)");
590+
{
591+
charstr[256];
592+
593+
snprintf(str,256,"%d: %s",WTERMSIG(exitstatus),
594+
WTERMSIG(exitstatus)<NSIG ?
595+
sys_siglist[WTERMSIG(exitstatus)] :"(unknown)");
596+
log_error(_("child process was terminated by signal %s"),str);
597+
}
593598
#else
594599
log_error(_("child process was terminated by signal %d"),
595600
WTERMSIG(exitstatus));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp