Source
/* On 32-bit GNU/Linux it is defined as 'int' (4 bytes). To print registers in a common way we print */
/*
** 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.
**/
/* required for getting at program counter */
/* required for getting at program counter */
const char *get_signal_name(int sig)
{
/* either strsignal() or sys_siglist[] could be used to */
/* get signal name, but these methods are not portable */
/* not all POSIX signals are available on all platforms, */
/* so we list only signals that we react to in our handlers */
switch (sig)
{
case SIGALRM: return "SIGALRM";
case SIGILL: return "SIGILL";
case SIGFPE: return "SIGFPE";
case SIGSEGV: return "SIGSEGV";
case SIGBUS: return "SIGBUS";
case SIGQUIT: return "SIGQUIT";
case SIGHUP: return "SIGHUP";
case SIGINT: return "SIGINT";
case SIGTERM: return "SIGTERM";