diff options
| -rw-r--r-- | sapi/fpm/fpm/fpm_children.c | 4 | ||||
| -rw-r--r-- | sapi/litespeed/lsapilib.c | 9 |
2 files changed, 11 insertions, 2 deletions
diff --git a/sapi/fpm/fpm/fpm_children.c b/sapi/fpm/fpm/fpm_children.c index 58f777541d..fc05cab82b 100644 --- a/sapi/fpm/fpm/fpm_children.c +++ b/sapi/fpm/fpm/fpm_children.c @@ -207,7 +207,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 = ""; diff --git a/sapi/litespeed/lsapilib.c b/sapi/litespeed/lsapilib.c index e3aabc0cc8..a5601afe95 100644 --- a/sapi/litespeed/lsapilib.c +++ b/sapi/litespeed/lsapilib.c @@ -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 ) { |
