gcc (GCC) 4.6.0 C89
I have a signal handler declared as follows:
struct sigaction new_action; new_action.sa_handler = g_signal_handler; new_action.sa_flags = SA_ONSTACK; if(sigaction(SIGINT, &new_action, NULL) == -1) { fprintf(stderr, "Failed to setup signal handlers."); return -1; }
When I ran my code through valgrind ie valgrind --leak-check=full , it found the following error:
==5206== Syscall param rt_sigaction(act->sa_mask) points to uninitialised byte(s) ==5206== at 0x347A435455: __libc_sigaction (in /lib64/libc-2.14.so)
So, looking at the manual pages, I decided to do this: just check:
new_action.sa_mask = SA_NODEFER;
However, just give me the following error:
error: incompatible types when assigning to type '__sigset_t' from type 'int'
Thanks so much for any suggestions,
source share