Subject: Re: race in select() ?
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Charles M. Hannum <abuse@spamalicious.com>
List: tech-kern
Date: 10/09/2003 23:58:04
On Thursday 09 October 2003 11:21 pm, der Mouse wrote:
> >> [...] wake up the main line?
> >
> > I like the "pipe to self" method primarily because it doesn't rely on
> > atomicity of *anything* -- it's entirely asynchronous.
>
> Unfortunately, unless carefully written, it does have
> constipation-deadlock potential.  If enough signals are delivered, fast
> enough that the main line doesn't get to run for long enough, the pipe
> can fill up and the process can deadlock against itself trying to write
> wakeup bytes to it.

Uh, you've heard of non-blocking I/O, right?  I don't think I see the problem 
here.