I have the following typedef function prototype:
typedef void (*sa_sigaction_t)(int, siginfo_t *, void *);
I have no idea how to use it. I understand that (int, siginfo_t *, void*) is typedef-ed into sa_sigaction_t. But how would I use it? These are all return types with no variable names specified.
So I assume I want to create a variable: sa_sigaction_t handler. How would I use it? The syntax is quite confusing.
Thanks,
Actually no.
sa_sigaction_tis a pointer to a function that returnsvoidand takes(int, siginfo_t *, void *)as parameters.So if you have:
you can do:
and then call it like this: