Skip to content

Instantly share code, notes, and snippets.

@jhawthorn
Last active December 14, 2015 11:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jhawthorn/5076820 to your computer and use it in GitHub Desktop.
Save jhawthorn/5076820 to your computer and use it in GitHub Desktop.
Hey sexy mama, Wanna kill all humans?
/* humans.c
* $ gcc -o humans humans.c
* $ ./humans &
* $ killall humans
*/
#include <stdio.h>
#include <unistd.h>
#include <signal.h>
void ex_program(int sig) {
system("mplayer humans.mp3");
}
int main(void) {
(void) signal(SIGTERM, ex_program);
while(1)
sleep(1000);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment