Re: A signal fairy tale

Christopher Smith (x@xman.org)
Fri, 29 Jun 2001 01:31:06 -0700


At 01:11 PM 6/28/2001 -0700, Daniel R. Kegel wrote:
>AFAIK, there's no 'read with a timeout' system call for file descriptors, so
>if you needed the equivalent of sigtimedwait(),
>you might end up doing a select on the sigopen fd, which is an extra
>system call. (I wish Posix had invented sigopen() and readtimedwait()
>instead of
>sigtimedwait...)

What, you don't want to use AIO or to collect your AIO signals? ;-)

In my apps, what I'd do is spawn a few worker threads which would do
blocking reads. Particularly if the sigopen() API allows me to grab
multiple signals from one fd, this should work well enough for one's high
performance needs. Alternatively, one could use select/poll to check if
there was data ready before doing the read. I agree though that it'd be
nice to have a timed read.

--Chris

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/