Hi,
is there any particular reason for MDB setting FD_CLOEXEC *only* on me->lfd?
I can't see why it should not set it for the other fds it opens, as IMO it doesn't make sense to hang onto the fds after exec() -- the mmap will be gone in any case.
Martin
h.b.furuseth@usit.uio.no said:
On Mon, 2014-03-10 at 22:14 +0100, Martin Lucina wrote:
is there any particular reason for MDB setting FD_CLOEXEC *only* on me->lfd?
It sets it to get rid of the file lock on the lockfile, and does not bother with the others.
In that case can I suggest adding FD_CLOEXEC to the other descriptors? I'm using MDB in a program that spawns other processes and I'd prefer not to leak the fds to them. mdb_env_get_fd() does not help here since it doesn't give me all the fds.
Martin
On Tue, 2014-03-11 at 10:03 +0100, Martin Lucina wrote:
h.b.furuseth@usit.uio.no said:
It sets it to get rid of the file lock on the lockfile, and does not bother with the others.
In that case can I suggest adding FD_CLOEXEC to the other descriptors? I'm using MDB in a program that spawns other processes and I'd prefer not to leak the fds to them.
Sounds like a fine opportunity to factor out some #ifdef _WIN32 stuff:-)
openldap-technical@openldap.org