I noticed in the definition of sigaction, sa_sigaction callback, the last argument is void *.
struct sigaction { void (*sa_handler)(int); void (*sa_sigaction)(int, siginfo_t *, void * ); sigset_t sa_mask; int sa_flags; void (*sa_restorer)(void); }
This will mean that you can pass the user argument to the sa_sigaction handler.
However, I could not find an example of this.
Does anyone know if you can pass an argument to the sigaction callback function? and do you have a simple example?
linux
simon
source share