diff options
| author | Jilles Tjoelker <jilles@FreeBSD.org> | 2012-09-29 11:54:34 +0000 | 
|---|---|---|
| committer | Jilles Tjoelker <jilles@FreeBSD.org> | 2012-09-29 11:54:34 +0000 | 
| commit | 05eb11cbc40a190f73ed1471d97062cabfc37d54 (patch) | |
| tree | 89610d7c33533a1abd5218d8db331931ee9e6327 /lib/libc/stdlib/random.c | |
| parent | 9c883c6cf029da76c3c385d1ff234c940d9ed0ef (diff) | |
Notes
Diffstat (limited to 'lib/libc/stdlib/random.c')
| -rw-r--r-- | lib/libc/stdlib/random.c | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/lib/libc/stdlib/random.c b/lib/libc/stdlib/random.c index 6da541912825..4a1af5452fd9 100644 --- a/lib/libc/stdlib/random.c +++ b/lib/libc/stdlib/random.c @@ -303,7 +303,7 @@ srandomdev(void)  		len = rand_deg * sizeof state[0];  	done = 0; -	fd = _open("/dev/random", O_RDONLY, 0); +	fd = _open("/dev/random", O_RDONLY | O_CLOEXEC, 0);  	if (fd >= 0) {  		if (_read(fd, (void *) state, len) == (ssize_t) len)  			done = 1; | 
