i am learning the APUE 10.3 signal, and just confusing the define of SIG_ERR, SIG_DFL and SIG_IGN. here is the definition:
#define SIG_ERR (void (*)())-1
#define SIG_DFL (void (*)())0
#define SIG_IGN (void (*)())1
and here is the signal function prototype:
void (*signal(int signo, void (*func)(int)))(int)
When we call signal(signo, SIG_DFL), why there is no function mismatch issue since the 2nd parameter should be void (*)(int)), however, what we provided SIG_DFL is the type of (void (*)()), void (*)(int)) vs (void (*)()) ?