zabbix-agent2/src/libs/zbxnix/sighandler.c
/******************************************************************************
 *                                                                            *
 * Function: child_signal_handler                                             *
 *                                                                            *
 * Purpose: handle child signal SIGCHLD                                       *
 *                                                                            *
 ******************************************************************************/
child_signal_handler

Purpose: handle child signal SIGCHLD
child_signal_handler Purpose : handle child signal SIGCHLD
static void	child_signal_handler(int sig, siginfo_t *siginfo, void *context)
{
	SIG_CHECK_PARAMS(sig, siginfo, context);
	if (!SIG_PARENT_PROCESS)
		exit_with_failure();
	if (ZBX_EXIT_NONE == sig_exiting)
	{
		sig_exiting = ZBX_EXIT_FAILURE;
		zabbix_log(LOG_LEVEL_CRIT, "One child process died (PID:%d,exitcode/signal:%d). Exiting ...",
				SIG_CHECKED_FIELD(siginfo, si_pid), SIG_CHECKED_FIELD(siginfo, si_status));
#if defined(HAVE_GNUTLS) || defined(HAVE_OPENSSL)
		zbx_tls_free_on_signal();
#endif
	}
}
static void child_signal_handler ( int sig , siginfo_t * siginfo , void * context ) { SIG_CHECK_PARAMS ( sig , siginfo , context ) ; if ( ! SIG_PARENT_PROCESS ) exit_with_failure ( ) ; if ( ZBX_EXIT_NONE == sig_exiting ) { sig_exiting = ZBX_EXIT_FAILURE ; zabbix_log ( LOG_LEVEL_CRIT , " " , SIG_CHECKED_FIELD ( siginfo , si_pid ) , SIG_CHECKED_FIELD ( siginfo , si_status ) ) ; #if defined ( HAVE_GNUTLS ) || defined ( HAVE_OPENSSL ) zbx_tls_free_on_signal ( ) ; #endif } }
Function: child_signal_handler                                             
                                                                            
 Purpose: handle child signal SIGCHLD
Function : child_signal_handler Purpose : handle child signal SIGCHLD