Skip to content

Commit 006355c

Browse files
kadlernikic
authored andcommitted
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.
1 parent 7d001af commit 006355c

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ PHP NEWS
77
. Fixed bug #77652 (Anonymous classes can lose their interface information).
88
(Nikita)
99

10+
- FPM:
11+
. Fixed bug #77677 (FPM fails to build on AIX due to missing WCOREDUMP).
12+
(Kevin Adler)
13+
1014
- Date:
1115
. Fixed bug #50020 (DateInterval:createDateFromString() silently fails).
1216
(Derick)

sapi/fpm/fpm/fpm_children.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,11 @@ void fpm_children_bury() /* {{{ */
204204

205205
} else if (WIFSIGNALED(status)) {
206206
const char *signame = fpm_signal_names[WTERMSIG(status)];
207+
#ifdef WCOREDUMP
207208
const char *have_core = WCOREDUMP(status) ? " - core dumped" : "";
209+
#else
210+
const char* have_core = "";
211+
#endif
208212

209213
if (signame == NULL) {
210214
signame = "";

sapi/litespeed/lsapilib.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2819,9 +2819,14 @@ static void lsapi_sigchild( int signal )
28192819
if ( WIFSIGNALED( status ))
28202820
{
28212821
int sig_num = WTERMSIG( status );
2822-
int dump = WCOREDUMP( status );
2822+
2823+
#ifdef WCOREDUMP
2824+
const char * dump = WCOREDUMP( status ) ? "yes" : "no";
2825+
#else
2826+
const char * dump = "unknown";
2827+
#endif
28232828
lsapi_log("Child process with pid: %d was killed by signal: "
2824-
"%d, core dump: %d\n", pid, sig_num, dump );
2829+
"%d, core dumped: %s\n", pid, sig_num, dump );
28252830
}
28262831
if ( pid == s_pid_dump_debug_info )
28272832
{

0 commit comments

Comments
 (0)