Last active
October 15, 2018 20:03
-
-
Save tonejito/e66bf96c9b802687481a0a88d9e2ccf0 to your computer and use it in GitHub Desktop.
La mejor señal es SIGTERM, la mejor señal es SIGKILL.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <signal.h> | |
void tangananica(int sig) {asm("nop;");} | |
void tanganana(int sig) {__asm__ ("nop;");} | |
int main(void) | |
{ | |
printf("%s\n","La mejor señal es SIGTERM,"); | |
signal(SIGTERM,tangananica); | |
printf("%s\n","la mejor señal es SIGKILL."); | |
signal(SIGKILL,tanganana); | |
printf("%s\n",""); | |
printf("%s\n","Yo ya no aguanto el SIGTERM,"); | |
kill(getpid(),SIGTERM); | |
printf("%s\n","ni yo tampoco el SIGKILL"); | |
kill(getpid(),SIGKILL); | |
return EXIT_SUCCESS; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment