who here has experience with signal.h? I need some help with it...I have searched through the documentation of signal.h and asked some people about it, but so far no luck. I need some help understanding what exactly this code does:
Code:
//i know what this does:
static int done = 0;
void poked(int sig)
{
done = 1;
}
//more code
.....code.....
//its this part i dont understand:
#ifdef SIGHUP
signal(SIGHUP, poked);
#endif
signal(SIGINT, poked);
#ifdef SIGQUIT
signal(SIGQUIT, poked);
#endif
signal(SIGTERM, poked);
Anybody have experience with the signal function (in signal.h)? Thanx.