Create new DB directory in race-free way
commitadcb919fec72e30c42cafbbdd4ad4bd3d71a0410
authorOlly Betts <olly@survex.com>
Wed, 1 Aug 2018 08:25:46 +0000 (1 20:25 +1200)
committerOlly Betts <olly@survex.com>
Wed, 1 Aug 2018 08:25:46 +0000 (1 20:25 +1200)
tree4e164a769f3e174cdb16762d4106a57a7e77579e
parent7d267677f0b6a854f4bd34213facece8aaba5c4e
Create new DB directory in race-free way

Call mkdir() before stat() instead of stat() before mkdir().  As
well as avoiding a race between two processes both trying to
create the same database, this is also slightly more efficient in
the probably more common case where the directory doesn't already
exist.
xapian-core/backends/glass/glass_database.cc