1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00

Fix bug #77677: WCOREDUMP not available on all systems

Add #ifdef WCOREDUMP around all uses.

Also Change core dump message to yes/no/unknown in lsapilib.
This commit is contained in:
Kevin Adler
2019-02-18 10:32:38 -06:00
committed by Nikita Popov
parent 7d001aff03
commit 006355c9fa
3 changed files with 15 additions and 2 deletions

4
NEWS
View File

@@ -7,6 +7,10 @@ PHP NEWS
. Fixed bug #77652 (Anonymous classes can lose their interface information).
(Nikita)
- FPM:
. Fixed bug #77677 (FPM fails to build on AIX due to missing WCOREDUMP).
(Kevin Adler)
- Date:
. Fixed bug #50020 (DateInterval:createDateFromString() silently fails).
(Derick)

View File

@@ -204,7 +204,11 @@ void fpm_children_bury() /* {{{ */
} else if (WIFSIGNALED(status)) {
const char *signame = fpm_signal_names[WTERMSIG(status)];
#ifdef WCOREDUMP
const char *have_core = WCOREDUMP(status) ? " - core dumped" : "";
#else
const char* have_core = "";
#endif
if (signame == NULL) {
signame = "";

View File

@@ -2819,9 +2819,14 @@ static void lsapi_sigchild( int signal )
if ( WIFSIGNALED( status ))
{
int sig_num = WTERMSIG( status );
int dump = WCOREDUMP( status );
#ifdef WCOREDUMP
const char * dump = WCOREDUMP( status ) ? "yes" : "no";
#else
const char * dump = "unknown";
#endif
lsapi_log("Child process with pid: %d was killed by signal: "
"%d, core dump: %d\n", pid, sig_num, dump );
"%d, core dumped: %s\n", pid, sig_num, dump );
}
if ( pid == s_pid_dump_debug_info )
{