summaryrefslogtreecommitdiffstats
path: root/lib/libc/db
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2015-09-13 17:17:52 +0000
committerjilles <jilles@FreeBSD.org>2015-09-13 17:17:52 +0000
commit5f1339c5cc73e7edb594e80c74a6bc0e6db56ac6 (patch)
treef093724264a6204f0190ab1a3188b3f6dad7562a /lib/libc/db
parent169f852b1d20528d93ee126f30d3a74123913147 (diff)
downloadFreeBSD-src-5f1339c5cc73e7edb594e80c74a6bc0e6db56ac6.zip
FreeBSD-src-5f1339c5cc73e7edb594e80c74a6bc0e6db56ac6.tar.gz
db/recno: Open with close-on-exec like btree and hash do.
Diffstat (limited to 'lib/libc/db')
-rw-r--r--lib/libc/db/recno/rec_open.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/db/recno/rec_open.c b/lib/libc/db/recno/rec_open.c
index dd286c0..8fce730 100644
--- a/lib/libc/db/recno/rec_open.c
+++ b/lib/libc/db/recno/rec_open.c
@@ -64,7 +64,7 @@ __rec_open(const char *fname, int flags, int mode, const RECNOINFO *openinfo,
int rfd, sverrno;
/* Open the user's file -- if this fails, we're done. */
- if (fname != NULL && (rfd = _open(fname, flags, mode)) < 0)
+ if (fname != NULL && (rfd = _open(fname, flags | O_CLOEXEC, mode)) < 0)
return (NULL);
/* Create a btree in memory (backed by disk). */
OpenPOWER on IntegriCloud