I have a question and even after research I could not solve it.
Let's say I have the following signal handler:
struct sigaction conf_signal;
conf_signal.sa_flags = 0;
sigemptyset(&conf_signal.sa_mask);
conf_signal.sa_handler = &sinal_chegou;
And the following code inside a for:
if (sigaction(SIGINT, &conf_signal, NULL) == -1) {
perror("sigaction");
exit(EXIT_FAILURE);
}
And my sinal_chegou
function has the following signature:
void sinal_chegou(void){
How do I send a received parameter in argv[]
to the sinal_chegou
function using the signal handler?