jthread and handleIO(true)

Parmelan, Edouard EP510777 at exchange.FRANCE.NCR.com
Thu Nov 19 11:02:40 PST 1998


> Godmar Back writes:
> > It appears that blocking signals before we go into the select is the
> > only way to really fix that.  That shouldn't hurt us much, though,
> > since it'll only happen when the system is about to go idle in select.
> I've faced a similar problem in a program that tries to handle
> both file descriptor events and signal events at the same time.
> There's no easy way to do it directly without a race condition.
> What you have to do is ...
>  - Open a pipe, which you always select for reading when calling select()
>  - Don't block signals during select()
>  - When you get a signal, write a byte to the pipe and return
As signals are internaly pending in interrupt(),
we should write in the pipe in interrupts() after marking it

Is it you said ?


More information about the kaffe mailing list