logo

Crowdly

Dado el siguiente código, ¿cuándo se ejecuta la sentencia  fprintf(stdout, "Fin ...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Dado el siguiente código, ¿cuándo se ejecuta la sentencia fprintf(stdout, "Fin del programa\n");?

void manejador_SIGALRM(int sig) {

printf("\nEstos son los numeros que me ha dado tiempo a contar\n");

}

int main(void) {

struct sigaction act;

long int i;

sigemptyset(&(act.sa_mask));

act.sa_flags = 0;

act.sa_handler = manejador_SIGALRM;

if (sigaction(SIGALRM, &act, NULL) < 0) {

perror("sigaction");

exit(EXIT_FAILURE);

}

if (alarm(10)) {

fprintf(stderr, "Existe una alarma previa establecida\n");

}

sleep(2);

sigsuspend(&(act.sa_mask));

fprintf(stdout, "Fin del programa\n");

exit(EXIT_SUCCESS);

}

0%
0%
0%
100%
More questions like this

Want instant access to all verified answers on moodle.uam.es?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!