Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/db/recno use O_CLOEXEC
details: https://anonhg.NetBSD.org/src/rev/0a0fbceeb624
branches: trunk
changeset: 766542:0a0fbceeb624
user: christos <christos%NetBSD.org@localhost>
date: Sun Jun 26 22:16:46 2011 +0000
description:
use O_CLOEXEC
diffstat:
lib/libc/db/recno/rec_open.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diffs (31 lines):
diff -r 8fe131bda1d3 -r 0a0fbceeb624 lib/libc/db/recno/rec_open.c
--- a/lib/libc/db/recno/rec_open.c Sun Jun 26 17:05:55 2011 +0000
+++ b/lib/libc/db/recno/rec_open.c Sun Jun 26 22:16:46 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rec_open.c,v 1.17 2008/09/11 12:58:00 joerg Exp $ */
+/* $NetBSD: rec_open.c,v 1.18 2011/06/26 22:16:46 christos Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
@@ -37,7 +37,7 @@
#endif
#include <sys/cdefs.h>
-__RCSID("$NetBSD: rec_open.c,v 1.17 2008/09/11 12:58:00 joerg Exp $");
+__RCSID("$NetBSD: rec_open.c,v 1.18 2011/06/26 22:16:46 christos Exp $");
#include "namespace.h"
#include <sys/types.h>
@@ -70,10 +70,8 @@
dbp = NULL;
/* Open the user's file -- if this fails, we're done. */
if (fname != NULL) {
- if ((rfd = open(fname, flags, mode)) == -1)
- return (NULL);
- if (fcntl(rfd, F_SETFD, FD_CLOEXEC) == -1)
- goto err;
+ if ((rfd = open(fname, flags | O_CLOEXEC, mode)) == -1)
+ return NULL;
}
/* Create a btree in memory (backed by disk). */
Home |
Main Index |
Thread Index |
Old Index