Your sighupHandler should be one of two below:
void sighupHandler(int)
or
void sighupHandler(int, signinfo_t *, void *)
For more information about this, see here and here.
EDIT: Please refer to the links below and my links above for better clarity. I think that in your case, because of the common storage, as suggested below, the compiler generates only a warning, otherwise it would generate an error.
A sigaction structure is defined as something like:
struct sigaction { void (*sa_handler)(int); void (*sa_sigaction)(int, siginfo_t *, void *); sigset_t sa_mask; int sa_flags; void (*sa_restorer)(void); };
On some architectures, a union is involved: do not assign both sa_handler
and sa_sigaction
.
source share