Messages in this thread | | | Date | Fri, 07 May 1999 17:04:44 +0000 | From | Dan Kegel <> | Subject | Re: async io? |
| |
Alan Cox wrote: > > you associate a signal to an fd using the F_SETSIG ioctl. ... > > [but] you can't tell what the signal means, i.e. whether > > the socket is now ready for reading, or for writing. > > You don't need to. Real time signals carry data - in this case the file > handle
The signal's data contains *only* the file descriptor -- but you need more.
You can tell which fd the signal refers to, but not whether the fd is ready for reading or writing (unless you do a poll() on it after getting the signal, which adds another system call I'd rather avoid).
Wouldn't it make sense to have three different signals associated with each fd, corresponding to the three different FD_SETs returned by select()? (Or maybe four, one for 'new connection'.) aio_ lets you do this, but F_SETSIG doesn't, I think.
I know, you can probably get by guessing what the fd is ready for, but it seems kludgy. - Dan
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |