Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Jan 1996 09:44:51 PST
From:      "Marty Leisner" <leisner@sdsp.mc.xerox.com>
To:        linux-kernel@vger.rutgers.edu, hackers@freebsd.org
Subject:   signal masks and select
Message-ID:  <9601301744.AA29546@gnu.mc.xerox.com>

next in thread | raw e-mail | index | archive | help

Select seems to have a well know problem...

If the idea is to block on select and wait for a signal to kick you out,
there's a problem...

if you implement code:

set_sigmask(unblock desired signals)
select(...)

you have a small window where the signal could sneak through and won't
kick you out of select...so the solution is select can't block forever
in select (so you have to select for a limited period and poll to see
if the signal snuck in...)

Is there any interest into making a select call in the kernel with
a new signal mask...so the above code segment becomes atomic
(but if you use it, it's not portable to other Unixes without this
enhancement...)

Comments?


marty		leisner@sdsp.mc.xerox.com   
Member of the League for Programming Freedom (http://www.lpf.org)
Any sufficiently advanced technology is indistinguishable from magic
        Arthur C. Clarke, The Lost Worlds of 2001

-- 
marty
leisner@sdsp.mc.xerox.com  
Member of the League for Programming Freedom





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9601301744.AA29546>