Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
#include <stdlib.h>
#include <stdio.h>
#include <signal.h>
#include <unistd.h>
/**
* Catch SIGTERM term commands
*/
void term_handler(int sig) {
printf("oooh, I've caught a SIGTERM : %d\n", sig);
exit(0);
}
int main(int argc, char* argv[]) {
// catch SIGTERM (eg, kill -9 PID)
signal(SIGTERM, term_handler);
// rest of your programme
return 0;
}