14dfl7.txt ;************************************************************************************************** ; LISTING 7 - SIGNAL HANDLER ; ; "Get those boards talking under Linux," EDN, July 6, 2000, pg 130 ; ; http://www.ednmag.com/ednmag/reg/2000/070600/14df.htm ;************************************************************************************************** struct sigaction io_act; // prototype: void sigio_handler(int sig) io_act.sa_handler = sigio_handler; // set address of handler procedure sigemptyset(&io_act.sa_mask); io_act.sa_flags = 0; if (sigaction(SIGIO, &io_act, NULL) != 0) { // Error: failed to set signal action // free allocated memory and resources and return }