Author: jilles
Date: Sun Sep 13 17:17:52 2015
New Revision: 287761
URL: https://svnweb.freebsd.org/changeset/base/287761

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

Modified:
  head/lib/libc/db/recno/rec_open.c

Modified: head/lib/libc/db/recno/rec_open.c
==============================================================================
--- head/lib/libc/db/recno/rec_open.c   Sun Sep 13 16:49:41 2015        
(r287760)
+++ head/lib/libc/db/recno/rec_open.c   Sun Sep 13 17:17:52 2015        
(r287761)
@@ -64,7 +64,7 @@ __rec_open(const char *fname, int flags,
        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). */
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to