aboutgitcodebugslistschat
path: root/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util.c')
-rw-r--r--util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util.c b/util.c
index 7c97910..6a39d2d 100644
--- a/util.c
+++ b/util.c
@@ -964,7 +964,7 @@ void raw_random(void *buf, size_t buflen)
{
size_t random_read = 0;
#ifndef HAS_GETRANDOM
- int fd = open(DEV_RANDOM, O_RDONLY);
+ int fd = open(DEV_RANDOM, O_RDONLY | O_CLOEXEC);
if (fd < 0)
die_perror("Couldn't open %s", DEV_RANDOM);