Secure external tools execution

This commit is contained in:
Andrea Mazzoleni 2026-05-09 17:44:08 +02:00
parent 084ced8699
commit a33e048a4b
9 changed files with 571 additions and 80 deletions

View file

@ -7,6 +7,31 @@
#include "support.h"
/****************************************************************************/
/* signal */
volatile int global_interrupt = 0;
int os_global_interrupt(void)
{
return global_interrupt;
}
static void signal_handler(int signum)
{
/* report the request of interruption with the signal received */
global_interrupt = signum;
}
void os_signal_init(void)
{
signal(SIGTERM, signal_handler);
signal(SIGINT, signal_handler);
}
/****************************************************************************/
/* os */
/**
* Exit codes.
*/