On Wednesday 28 July 2004 16:23, Dhiman, Gaurav wrote: > > As far as I can think and have also read in Rubini's book, we can > make use of poll() or select() system calls in signal handler to know > which file or set of files has asynchronously delivered the SIGIO > signal, but the problem is if we have two or more than two files > (which has been set for asynchronous notification) which delivers > SIGIO at same time, even poll and select can not help, because poll() > and select () system call returns integer which specifies the number > of files which are ready for a particular event (read or write or > anything else we queried for). poll() and select() system calls do > not tell, which particular file or file descriptor has an event to > perform. Sure they do, just not via the return value. If they didn't, what use would they be to anyone? For poll(), you need to look at the 'revents' element of each of the 'struct pollfd's. For select(), you need to use FD_ISSET() to test each of the file descriptors against each of the 'fd_set's. -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/