Source
zbx_get_pid_file_pathname_f get_pid_file_cb, zbx_on_exit_t zbx_on_exit_cb_arg, int config_log_type,
/*
** Zabbix
** Copyright (C) 2001-2023 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
static int parent_pid = -1;
/* pointer to function for getting caller's PID file location */
static zbx_get_pid_file_pathname_f get_pid_file_pathname_cb = NULL;
static zbx_get_threads_f get_threads_func_cb;
static zbx_get_config_int_f get_threads_num_func_cb;
extern int get_process_info_by_thread(int local_server_num, unsigned char *local_process_type,
int *local_process_num);
static zbx_signal_handler_f sigusr_handler;
static zbx_signal_redirect_f signal_redirect_handler;
/******************************************************************************
* *
* Purpose: common SIGUSR1 handler for Zabbix processes *
* *
******************************************************************************/
static void common_sigusr_handler(int flags)
{
switch (ZBX_RTC_GET_MSG(flags))
{
case ZBX_RTC_LOG_LEVEL_INCREASE:
zabbix_increase_log_level();
break;
case ZBX_RTC_PROF_ENABLE:
zbx_prof_enable(ZBX_RTC_GET_SCOPE(flags));