grand: Use "e" mode flag in fopen () call for race-free setting of the close-on-exec flag

It was missed when other fopen () call sites were converted since the code
had it written as "fopen()" (without space before the opening parenthesis).
This commit is contained in:
Maciej S. Szmigiero 2023-02-22 00:29:31 +01:00
parent 339aaa3719
commit 7bee4cecdd

View File

@ -230,7 +230,7 @@ g_rand_new (void)
do
{
dev_urandom = fopen("/dev/urandom", "rb");
dev_urandom = fopen ("/dev/urandom", "rbe");
}
while G_UNLIKELY (dev_urandom == NULL && errno == EINTR);