I'm trying to set up a signal handler so that I can catch catch SIGIO to handle async read operations from the serial port. I define my signal handler as:
Code:
void signal_handler_IO (int status);
and then define the signal action:
Code:
struct sigaction saio;
then to put it all together I got this from tldp:
Code:
         /* install the signal handler before making the device asynchronous */
        saio.sa_handler = signal_handler_IO;
        saio.sa_mask = 0;
        saio.sa_flags = 0;
        saio.sa_restorer = NULL;
        sigaction(SIGIO,&saio,NULL);
          
        /* allow the process to receive SIGIO */
        fcntl(fd, F_SETOWN, getpid());
        /* Make the file descriptor asynchronous (the manual page says only 
           O_APPEND and O_NONBLOCK, will work with F_SETFL...) */
        fcntl(fd, F_SETFL, FASYNC);
the problem is when I compile I recieve an error "no match for `__sigset_t & = int'" on the line "saio.sa_mask = 0;". I've tried putting signals that I know to be valid in this space and even typecasting to sigset_t but the problem persists. Is there something I'm overlooking here?

I'm using GCC version 2.95.4 on debian linux

thanks,
Devan