Re: Desperately missing a working "pselect()" or similar...

From: lkv@isg.de
Date: Fri Oct 05 2001 - 11:28:28 EST


Alexander Viro wrote:
>
> On Fri, 5 Oct 2001 lkv@isg.de 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.

What exactly would be the advantage of doubling the number of processes
running just to introduce this indirection? An additional context-switch
surely doesn't speed up things... or am I misinterpreting your proposal
completely?

Regards,

Lutz Vieweg

--
 Dipl. Phys. Lutz Vieweg | email: lkv@isg.de
 Innovative Software AG  | Phone/Fax: +49-69-505030 -120/-505
 Feuerbachstrasse 26-32  | http://www.isg.de/people/lkv/
 60325 Frankfurt am Main | ^^^ PGP key available here ^^^
-
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/



This archive was generated by hypermail 2b29 : Sun Oct 07 2001 - 21:00:38 EST