zabbix-agent2/src/libs/zbxnix/sighandler.c
/******************************************************************************
 *                                                                            *
 * Function: zbx_block_signals                                                *
 *                                                                            *
 * Purpose: block signals to avoid interruption                               *
 *                                                                            *
 ******************************************************************************/
zbx_block_signals

Purpose: block signals to avoid interruption
zbx_block_signals Purpose : block signals to avoid interruption
void	zbx_block_signals(sigset_t *orig_mask)
{
	sigset_t	mask;
	sigemptyset(&mask);
	sigaddset(&mask, SIGUSR1);
	sigaddset(&mask, SIGUSR2);
	sigaddset(&mask, SIGTERM);
	sigaddset(&mask, SIGINT);
	sigaddset(&mask, SIGQUIT);
	if (0 > sigprocmask(SIG_BLOCK, &mask, orig_mask))
		zabbix_log(LOG_LEVEL_WARNING, "cannot set sigprocmask to block the signal");
}
void zbx_block_signals ( sigset_t * orig_mask ) { sigset_t mask ; sigemptyset ( & mask ) ; sigaddset ( & mask , SIGUSR1 ) ; sigaddset ( & mask , SIGUSR2 ) ; sigaddset ( & mask , SIGTERM ) ; sigaddset ( & mask , SIGINT ) ; sigaddset ( & mask , SIGQUIT ) ; if ( 0 > sigprocmask ( SIG_BLOCK , & mask , orig_mask ) ) zabbix_log ( LOG_LEVEL_WARNING , " " ) ; }
Function: zbx_block_signals                                                
                                                                            
 Purpose: block signals to avoid interruption
Function : zbx_block_signals Purpose : block signals to avoid interruption