db/recno: Open with close-on-exec like btree and hash do.

This commit is contained in:
Jilles Tjoelker 2015-09-13 17:17:52 +00:00
parent 6187d4722a
commit 636b8d937e

View File

@ -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). */