summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--entropy.c6
2 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index ed6c3308a..f683a86f2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
120010803
2 - (djm) Fix interrupted read in entropy gatherer. Spotted by markus@ on
3 a fast UltraSPARC.
4
120010726 520010726
2 - (stevesk) use mysignal() in protocol 1 loop now that the SIGCHLD 6 - (stevesk) use mysignal() in protocol 1 loop now that the SIGCHLD
3 handler has converged. 7 handler has converged.
@@ -6103,4 +6107,4 @@
6103 - Wrote replacements for strlcpy and mkdtemp 6107 - Wrote replacements for strlcpy and mkdtemp
6104 - Released 1.0pre1 6108 - Released 1.0pre1
6105 6109
6106$Id: ChangeLog,v 1.1424 2001/07/26 17:51:49 stevesk Exp $ 6110$Id: ChangeLog,v 1.1425 2001/08/06 06:51:49 djm Exp $
diff --git a/entropy.c b/entropy.c
index 554a72b0d..d9760cc1d 100644
--- a/entropy.c
+++ b/entropy.c
@@ -40,7 +40,7 @@
40#include "pathnames.h" 40#include "pathnames.h"
41#include "log.h" 41#include "log.h"
42 42
43RCSID("$Id: entropy.c,v 1.37 2001/06/27 13:36:08 djm Exp $"); 43RCSID("$Id: entropy.c,v 1.38 2001/08/06 06:51:49 djm Exp $");
44 44
45#ifndef offsetof 45#ifndef offsetof
46# define offsetof(type, member) ((size_t) &((type *)0)->member) 46# define offsetof(type, member) ((size_t) &((type *)0)->member)
@@ -505,7 +505,9 @@ hash_output_from_command(entropy_source_t *src, char *hash)
505 break; 505 break;
506 case 1: 506 case 1:
507 /* command input */ 507 /* command input */
508 bytes_read = read(p[0], buf, sizeof(buf)); 508 do {
509 bytes_read = read(p[0], buf, sizeof(buf));
510 } while (bytes_read == -1 && errno == EINTR);
509 RAND_add(&bytes_read, sizeof(&bytes_read), 0.0); 511 RAND_add(&bytes_read, sizeof(&bytes_read), 0.0);
510 if (bytes_read == -1) { 512 if (bytes_read == -1) {
511 error_abort = 1; 513 error_abort = 1;