On 3/7/11 11:52 AM, Linus Torvalds wrote:
> On Mon, Mar 7, 2011 at 8:24 AM, Linus Torvalds
> <[email protected]> wrote:
>>
>> and I think one reason why the race is hard to get rid of is simply
>> that system call return is _the_ common point of signal handling in
>> UNIX (technically, obviously any return to user space, but there are
>> no appreciable interrupts etc going on, and there _are_ a lot of
>> system calls). The above trace is one that my patch would have handled
>> correctly (it has no EINTR).
>
> Linux also ends up making this race easier to see probably because all
> system calls that are interruptible by signals are all "greedy": they
> try to do as much real work as possible, rather than return EINTR.
Yes, the BSDs have traditionally behaved this way as well. I just had
a much harder time reproducing this on FreeBSD-derived Mac OS X.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU [email protected] http://cnswww.cns.cwru.edu/~chet/