h.b.furuseth@usit.uio.no wrote:
cmikk@qwest.net writes:
The patch at:
http://mikk.net/~chris/patches/0002-Remove-POSIX-semaphores-when-the-last-us...
Attempts to upgrade the lockfile lock to exclusive when closing the environment. If that upgrade succeeds, it removes the semaphores.
That won't help if the mdb proccess crashes.
If which process crashes? If some other process crashes then this lock will succeed and remove the semaphores.
Sounds like mdb needs some cleanup API calls. Maybe one which does the same as your patch after opening the environment - except it does not create any files, and fails if the exclusive lock fails.
Sounds OK. Could add an invocation of it as an option for mdb_stat. mdb_stat needs to be extended anyway.