Scott Hess wrote:
> I've checked further, and found that FreeBSD correctly handles blocking
> signals on a per-thread basis.  _But_, all threads still get EINTR when a
> signal happens while they're in a blocking read.
> 
> I've attached the updated program that shows the correct delivery of the
> signals, with system calls still being interrupted.  [Sorry about the
> attachment, but that seems the safest way to go about getting the file
> delivered in usable fashion.]

Thanks for the test program; it makes it much easier on the
developers.

After consultation with the POSIX spec and John Birrell, it seems
that FreeBSD is in error.  Along with incorrectly waking up threads
blocked on I/O, signals should _not_ be delivered to more than one
thread - FreeBSD was delivering them to every thread that had the
signal unmasked.

I have a fix for this, but will sit on it for another day or so,
until I can test it some more.  Your test program now works as it
should, BTW.

Dan Eischen
[EMAIL PROTECTED]


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to