On Linux, is it possible to somehow disable signaling for programs externally... that is, without modifying their source code?
Context:
This is example code of enabling signals like Ctrl+C for programs which block it.
fixControlC.c
#include
#include
int sigaddset(sigset_t *set, int signo) {
printf("int sigaddset(sigset_t *set=%p, int signo=%d)\n", set, signo);
return 0;
}
Compile it:
gcc -fPIC -shared -o fixControlC.so fixControlC.c
Run it:
LD_LIBRARY_PATH=. LD_PRELOAD=fixControlC.so mysqld