summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/arc4random.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/gen/arc4random.c')
-rw-r--r--lib/libc/gen/arc4random.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/gen/arc4random.c b/lib/libc/gen/arc4random.c
index 46059ab..59e410b 100644
--- a/lib/libc/gen/arc4random.c
+++ b/lib/libc/gen/arc4random.c
@@ -153,7 +153,7 @@ arc4_stir(void)
if (arc4_sysctl((u_char *)&rdat, KEYSIZE) == KEYSIZE)
done = 1;
if (!done) {
- fd = _open(RANDOMDEV, O_RDONLY, 0);
+ fd = _open(RANDOMDEV, O_RDONLY | O_CLOEXEC, 0);
if (fd >= 0) {
if (_read(fd, &rdat, KEYSIZE) == KEYSIZE)
done = 1;
OpenPOWER on IntegriCloud