Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Nov 1999 00:38:01 -0500 (EST)
From:      Daniel Eischen <eischen@vigrid.com>
To:        eischen@vigrid.com, freebsd-hackers@FreeBSD.ORG, scott@avantgo.com
Subject:   Re: EINTR problems with multithreaded programs.
Message-ID:  <199911220538.AAA01826@pcnet1.pcnet.com>

next in thread | raw e-mail | index | archive | help
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
eischen@vigrid.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




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