summaryrefslogtreecommitdiff
path: root/lib/tdb
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-01-22 10:54:12 +0100
committerTim Prouty <tprouty@samba.org>2009-02-25 13:57:11 -0800
commite17df483fbedb81aededdef5fbb6ae1d034bc2dd (patch)
treedf23958d3f10c89b3ce72af20fb9a7a8885b68dd /lib/tdb
parent95e428e2279b706ac590ffb964fda07fd1ee2200 (diff)
downloadsamba-e17df483fbedb81aededdef5fbb6ae1d034bc2dd.tar.gz
samba-e17df483fbedb81aededdef5fbb6ae1d034bc2dd.tar.bz2
samba-e17df483fbedb81aededdef5fbb6ae1d034bc2dd.zip
lib/tdb: if we know pwrite and pread are thread/fork safe tdb_reopen_all() should be a noop
The reason for tdb_reopen_all() is that the seek pointer on fds are shared between parent and child. metze
Diffstat (limited to 'lib/tdb')
-rw-r--r--lib/tdb/common/open.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/tdb/common/open.c b/lib/tdb/common/open.c
index b19e4cea29..e58c8ca7ff 100644
--- a/lib/tdb/common/open.c
+++ b/lib/tdb/common/open.c
@@ -461,6 +461,10 @@ fail:
/* reopen all tdb's */
int tdb_reopen_all(int parent_longlived)
{
+#if defined(LIBREPLACE_PREAD_NOT_REPLACED) && \
+ defined(LIBREPLACE_PWRITE_NOT_REPLACED)
+ return 0;
+#else
struct tdb_context *tdb;
for (tdb=tdbs; tdb; tdb = tdb->next) {
@@ -483,6 +487,7 @@ int tdb_reopen_all(int parent_longlived)
if (tdb_reopen(tdb) != 0)
return -1;
}
+#endif
return 0;
}