From 50cd1f83e8c45d76fad81d6a764dec7e097d76e6 Mon Sep 17 00:00:00 2001 From: David Schleef Date: Mon, 9 Jul 2001 20:12:07 +0000 Subject: [PATCH] Changed from siginfo handler to signal. --- demo/sigio.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/demo/sigio.c b/demo/sigio.c index c620b53..15bd4df 100644 --- a/demo/sigio.c +++ b/demo/sigio.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -29,7 +28,7 @@ comedi_t *device; void print_time(void); -void sigio_handler(int sig,siginfo_t *si,void *x) +void sigio_handler(int sig) { print_time(); } @@ -104,14 +103,10 @@ int main(int argc, char *argv[]) if(ret<0)perror("fcntl"); memset(&sa,0,sizeof(sa)); - sa.sa_sigaction = &sigio_handler; - sa.sa_flags = SA_SIGINFO; + sa.sa_handler = &sigio_handler; ret = sigaction(SIGIO,&sa,NULL); if(ret<0)perror("sigaction"); - ret = fcntl(comedi_fileno(dev),F_SETSIG,SIGIO); - if(ret<0)perror("fcntl"); - sigemptyset(&sigset); sigaddset(&sigset,SIGIO); ret = sigprocmask(SIG_UNBLOCK,&sigset,NULL); -- 2.26.2