urandom: Use O_CLOEXEC.

This commit is contained in:
Richard W.M. Jones
2017-11-21 11:36:59 +00:00
parent 1f66344961
commit 7960eb9bc6

View File

@@ -26,7 +26,7 @@
open Unix
let open_urandom_fd () = openfile "/dev/urandom" [O_RDONLY] 0
let open_urandom_fd () = openfile "/dev/urandom" [O_RDONLY; O_CLOEXEC] 0
let read_byte fd =
let b = Bytes.make 1 ' ' in