#include <stdio.h>
#include <signal.h>
#include <sys/types.h>
#include <unistd.h>
static void handle_signal(int param)
{
}
int main()
{
for (int signal_number = 1; signal_number <= 31; signal_number++) {
(void) signal(signal_number, handle_signal);
}
// Issue can't seem to be triggered with raise(3).
printf("PID: %d\n", (int) getpid());
while (1) ;
}
Start the program and send any other signal than SIGKILL or SIGSTOP, for instance ^C.
After it has received a signal, it cannot be killed or stopped.
#include <stdio.h>
#include <signal.h>
#include <sys/types.h>
#include <unistd.h>
static void handle_signal(int param)
{
}
int main()
{
(void) signal(SIGINT, handle_signal);
// Issue can't seem to be triggered with raise(3).
printf("PID: %d\n", (int) getpid());
while (1) ;
}
Start program, attempt to interrupt it with ^C. It can't be killed with SIGKILL, but it can be killed with SIGHUP.
Last tested 2024-08-24 99b0181: still the same
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too