pal_random: Open /dev/urandom with O_CLOEXEC (#1249)
authorLeandro A. F. Pereira <leandro.pereira@microsoft.com>
Wed, 15 Jan 2020 12:12:19 +0000 (04:12 -0800)
committerStephen Toub <stoub@microsoft.com>
Wed, 15 Jan 2020 12:12:19 +0000 (07:12 -0500)
commit6d89321b02a18b9d18b425d40cc1067b040dc00c
treee247a583598cab222bd0d9f428ac8aa247af8a33
parent92025b2c5a23ce317fb5ff5432213e465d3f84f1
pal_random: Open /dev/urandom with O_CLOEXEC (#1249)

The third argument to open(2) is ignored by the system call unless
O_CREAT is passed in the second argument.  O_CLOEXEC should be OR-ed
with the second argument.
src/coreclr/src/pal/src/misc/miscpalapi.cpp
src/libraries/Native/Unix/System.Native/pal_random.c