summaryrefslogtreecommitdiffstats
path: root/freebsd/lib/libc/db/recno/rec_open.c
diff options
context:
space:
mode:
Diffstat (limited to 'freebsd/lib/libc/db/recno/rec_open.c')
-rw-r--r--freebsd/lib/libc/db/recno/rec_open.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/freebsd/lib/libc/db/recno/rec_open.c b/freebsd/lib/libc/db/recno/rec_open.c
index 81945fea..1ad0bb6a 100644
--- a/freebsd/lib/libc/db/recno/rec_open.c
+++ b/freebsd/lib/libc/db/recno/rec_open.c
@@ -66,7 +66,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). */