From f8b3c627949bd4bc2f6aafb3dab2f56e3aa9ba06 Mon Sep 17 00:00:00 2001 From: Brian Wellington Date: Wed, 4 Apr 2001 20:57:35 +0000 Subject: [PATCH] 804. [bug] Attempting to obtain entropy could fail in some situations. This would be most common on systems with user-space threads. [RT #1131] --- CHANGES | 4 ++++ lib/isc/unix/entropy.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 29501f37ba..e5db94f685 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ + 804. [bug] Attempting to obtain entropy could fail in some + situations. This would be most common on systems + with user-space threads. [RT #1131] + 803. [bug] Treat all SIG queries as if they have the CD bit set, otherwise no data will be returned [RT #749] diff --git a/lib/isc/unix/entropy.c b/lib/isc/unix/entropy.c index cd42787e2c..0d5ef05fa5 100644 --- a/lib/isc/unix/entropy.c +++ b/lib/isc/unix/entropy.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: entropy.c,v 1.57 2001/02/05 23:00:18 bwelling Exp $ */ +/* $Id: entropy.c,v 1.58 2001/04/04 20:57:35 bwelling Exp $ */ #include @@ -395,7 +395,7 @@ get_from_filesource(isc_entropysource_t *source, isc_uint32_t desired) { ndesired = ISC_MIN(desired, sizeof(buf)); n = read(fd, buf, ndesired); if (n < 0) { - if (errno == EAGAIN) + if (errno == EAGAIN || errno == EINTR) goto out; close(fd); source->bad = ISC_TRUE;