Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
82480fc2
Commit
82480fc2
authored
Jan 28, 2007
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use sys_siglist[] to print out signal names for signal exits, rather
than just numbers.
parent
3ec7ae1b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
100 additions
and
12 deletions
+100
-12
configure
configure
+62
-0
configure.in
configure.in
+10
-1
src/backend/postmaster/postmaster.c
src/backend/postmaster/postmaster.c
+17
-7
src/include/pg_config.h.in
src/include/pg_config.h.in
+3
-0
src/port/exec.c
src/port/exec.c
+8
-4
No files found.
configure
View file @
82480fc2
...
...
@@ -15600,6 +15600,68 @@ fi
rm
-f
conftest.err conftest.
$ac_objext
\
conftest
$ac_exeext
conftest.
$ac_ext
echo
"
$as_me
:
$LINENO
: checking for sys_siglist"
>
&5
echo
$ECHO_N
"checking for sys_siglist...
$ECHO_C
"
>
&6
if
test
"
${
pgac_cv_var_sys_siglist
+set
}
"
=
set
;
then
echo
$ECHO_N
"(cached)
$ECHO_C
"
>
&6
else
cat
>
conftest.
$ac_ext
<<
_ACEOF
/* confdefs.h. */
_ACEOF
cat
confdefs.h
>>
conftest.
$ac_ext
cat
>>
conftest.
$ac_ext
<<
_ACEOF
/* end confdefs.h. */
#include <signal.h>
int
main ()
{
extern char *sys_siglist[]; (void)sys_siglist[0];
;
return 0;
}
_ACEOF
rm
-f
conftest.
$ac_objext
conftest
$ac_exeext
if
{
(
eval echo
"
$as_me
:
$LINENO
:
\"
$ac_link
\"
"
)
>
&5
(
eval
$ac_link
)
2>conftest.er1
ac_status
=
$?
grep
-v
'^ *+'
conftest.er1
>
conftest.err
rm
-f
conftest.er1
cat
conftest.err
>
&5
echo
"
$as_me
:
$LINENO
:
\$
? =
$ac_status
"
>
&5
(
exit
$ac_status
)
;
}
&&
{
ac_try
=
'test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{
(
eval echo
"
$as_me
:
$LINENO
:
\"
$ac_try
\"
"
)
>
&5
(
eval
$ac_try
)
2>&5
ac_status
=
$?
echo
"
$as_me
:
$LINENO
:
\$
? =
$ac_status
"
>
&5
(
exit
$ac_status
)
;
}
;
}
&&
{
ac_try
=
'test -s conftest$ac_exeext'
{
(
eval echo
"
$as_me
:
$LINENO
:
\"
$ac_try
\"
"
)
>
&5
(
eval
$ac_try
)
2>&5
ac_status
=
$?
echo
"
$as_me
:
$LINENO
:
\$
? =
$ac_status
"
>
&5
(
exit
$ac_status
)
;
}
;
}
;
then
pgac_cv_var_sys_siglist
=
yes
else
echo
"
$as_me
: failed program was:"
>
&5
sed
's/^/| /'
conftest.
$ac_ext
>
&5
pgac_cv_var_sys_siglist
=
no
fi
rm
-f
conftest.err conftest.
$ac_objext
\
conftest
$ac_exeext
conftest.
$ac_ext
fi
echo
"
$as_me
:
$LINENO
: result:
$pgac_cv_var_sys_siglist
"
>
&5
echo
"
${
ECHO_T
}
$pgac_cv_var_sys_siglist
"
>
&6
if
test
x
"
$pgac_cv_var_sys_siglist
"
=
x
"yes"
;
then
cat
>>
confdefs.h
<<
\
_ACEOF
#define HAVE_SYS_SIGLIST 1
_ACEOF
fi
echo
"
$as_me
:
$LINENO
: checking for syslog"
>
&5
echo
$ECHO_N
"checking for syslog...
$ECHO_C
"
>
&6
if
test
"
${
ac_cv_func_syslog
+set
}
"
=
set
;
then
...
...
configure.in
View file @
82480fc2
dnl Process this file with autoconf to produce a configure script.
dnl $PostgreSQL: pgsql/configure.in,v 1.49
7 2007/01/18 14:07:31 petere
Exp $
dnl $PostgreSQL: pgsql/configure.in,v 1.49
8 2007/01/28 01:12:05 momjian
Exp $
dnl
dnl Developers, please strive to achieve this order:
dnl
...
...
@@ -1059,6 +1059,15 @@ AC_TRY_LINK([#include <setjmp.h>],
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])
AC_CACHE_CHECK([for sys_siglist], pgac_cv_var_sys_siglist,
[AC_TRY_LINK([#include <signal.h>],
[extern char *sys_siglist[]; (void)sys_siglist[0];],
[pgac_cv_var_sys_siglist=yes],
[pgac_cv_var_sys_siglist=no])])
if test x"$pgac_cv_var_sys_siglist" = x"yes"; then
AC_DEFINE(HAVE_SYS_SIGLIST, 1, [Define to 1 if you have the global variable 'char *sys_siglist[]'.])
fi
AC_CHECK_FUNC(syslog,
[AC_CHECK_HEADER(syslog.h,
[AC_DEFINE(HAVE_SYSLOG, 1, [Define to 1 if you have the syslog interface.])])])
...
...
src/backend/postmaster/postmaster.c
View file @
82480fc2
...
...
@@ -37,7 +37,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.51
2 2007/01/23 03:28:49
momjian Exp $
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.51
3 2007/01/28 01:12:05
momjian Exp $
*
* NOTES
*
...
...
@@ -2421,23 +2421,33 @@ LogChildExit(int lev, const char *procname, int pid, int exitstatus)
(
errmsg
(
"%s (PID %d) exited with exit code %d"
,
procname
,
pid
,
WEXITSTATUS
(
exitstatus
))));
else
if
(
WIFSIGNALED
(
exitstatus
))
#if
ndef WIN32
#if
defined(WIN32)
ereport
(
lev
,
/*------
translator: %s is a noun phrase describing a child process, such as
"server process" */
(
errmsg
(
"%s (PID %d) was terminated by signal %d"
,
procname
,
pid
,
WTERMSIG
(
exitstatus
))));
(
errmsg
(
"%s (PID %d) was terminated by exception %X"
,
procname
,
pid
,
WTERMSIG
(
exitstatus
)),
errhint
(
"See C include file
\"
ntstatus.h
\"
for a description of the hex value."
)));
#elif defined(HAVE_SYS_SIGLIST)
ereport
(
lev
,
/*------
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 signal"
,
WTERMSIG
(
exitstatus
))));
#else
ereport
(
lev
,
/*------
translator: %s is a noun phrase describing a child process, such as
"server process" */
(
errmsg
(
"%s (PID %d) was terminated by exception %X"
,
procname
,
pid
,
WTERMSIG
(
exitstatus
)),
errhint
(
"See /include/ntstatus.h for a description of the hex value."
)));
(
errmsg
(
"%s (PID %d) was terminated by signal %d"
,
procname
,
pid
,
WTERMSIG
(
exitstatus
))));
#endif
else
ereport
(
lev
,
...
...
src/include/pg_config.h.in
View file @
82480fc2
...
...
@@ -478,6 +478,9 @@
/* Define to 1 if you have the <sys/shm.h> header file. */
#undef HAVE_SYS_SHM_H
/* Define to 1 if you have the global variable 'char *sys_siglist[]'. */
#undef HAVE_SYS_SIGLIST
/* Define to 1 if you have the <sys/socket.h> header file. */
#undef HAVE_SYS_SOCKET_H
...
...
src/port/exec.c
View file @
82480fc2
...
...
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/port/exec.c,v 1.4
8 2007/01/23 03:31:33
momjian Exp $
* $PostgreSQL: pgsql/src/port/exec.c,v 1.4
9 2007/01/28 01:12:05
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -582,11 +582,15 @@ pclose_check(FILE *stream)
log_error
(
_
(
"child process exited with exit code %d"
),
WEXITSTATUS
(
exitstatus
));
else
if
(
WIFSIGNALED
(
exitstatus
))
#if
ndef WIN32
log_error
(
_
(
"child process was terminated by
signal %d
"
),
#if
defined(WIN32)
log_error
(
_
(
"child process was terminated by
exception %X
\n
See C include file
\"
ntstatus.h
\"
for a description of the hex value.
"
),
WTERMSIG
(
exitstatus
));
#elif defined(HAVE_SYS_SIGLIST)
log_error
(
_
(
"child process was terminated by signal: %s"
),
WTERMSIG
(
exitstatus
)
<
NSIG
?
sys_siglist
[
WTERMSIG
(
exitstatus
)]
:
"unknown signal"
);
#else
log_error
(
_
(
"child process was terminated by
exception %X
\n
See /include/ntstatus.h for a description of the hex value.
"
),
log_error
(
_
(
"child process was terminated by
signal %d
"
),
WTERMSIG
(
exitstatus
));
#endif
else
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment