[lkml]   [2001]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Desperately missing a working "pselect()" or similar...

On Fri, 5 Oct 2001 wrote:

> A somewhat bizarre solution would be to have the process create
> a pipe-pair, select on the reading end, and let the signal-handler
> write a byte to the pipe - but this has at least the drawback
> you always spoil one "select-cycle" for each signal you get - as
> the first return from the select() call happenes without any
> fds being flagged as readable, only when you enter select() once
> more the pipe will cause the return and tell you what happened...

fork() is cheap. Create a child, have a pipe between child and
parent and do select() on the other end of pipe. I.e. signal handler
writes into pipe and that triggers select() in the second process.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:04    [W:0.079 / U:5.024 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site