logo

Crowdly

Considérez le programme suivant:   //https://onlinegdb.com/B1xKX-Lkg_ int Contin...

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

Considérez le programme suivant:   //https://onlinegdb.com/B1xKX-Lkg_

int Continuer = 1;

void action (int SIG){    

    switch(SIG)

      {      case SIGUSR2 : printf("SIGNAL: SIGUSR2 reçu\n"); Continuer=0; break;

             case SIGINT : printf("SIGNAL: SIGINT reçu \n"); break;

             case SIGUSR1 :printf("SIGNAL: SIGUSR1 reçu \n"); break;

             default :  printf("SIGNAL %d: Signal Inconnu\n", SIG);

        }

  }

  int main () {

       signal(SIGUSR2, action);

       signal(SIGINT, action);

       while (Continuer) {

            kill(getpid(), SIGINT);

            kill(getpid(), SIGUSR1);

            kill(getpid(), SIGUSR2);

      }

      _exit(0);

}

Comment ce processus va-t-il se terminer ?

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

Want instant access to all verified answers on moodle.polymtl.ca?

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