Wladimir J. van der Laan
fc888bfcac
util: Fix multiple use of LockDirectory
...
This commit fixes problems with calling LockDirectory multiple times on
the same directory, or from multiple threads. It also fixes the build on
OpenBSD.
- Wrap the boost::interprocess::file_lock in a std::unique_ptr inside
the map that keeps track of per-directory locks. This fixes a build
issue with the clang 4.0.0+boost-1.58.0p8 version combo on OpenBSD
6.2, and should have no observable effect otherwise.
- Protect the locks map using a mutex.
- Make sure that only locks that are successfully acquired are inserted
in the map.
- Open the lock file for appending only if we know we don't have the
lock yet - The `FILE* file = fsbridge::fopen(pathLockFile, "a");`
wipes the 'we own this lock' administration, likely because it opens
a new fd for the locked file then closes it.
2018-02-15 16:24:45 +01:00
..
2018-01-16 11:48:33 +01:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-25 18:02:24 -05:00
2018-02-07 16:15:28 -05:00
2018-02-12 15:48:37 +01:00
2018-02-12 09:13:38 -05:00
2018-02-11 10:48:15 +01:00
2017-09-29 16:02:39 +02:00
2018-01-03 02:26:56 +09:00
2018-02-11 10:48:15 +01:00
2018-02-10 09:55:54 -05:00
2018-02-12 09:13:38 -05:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-29 14:26:26 +01:00
2018-02-07 16:15:28 -05:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2017-11-16 08:23:01 +13:00
2017-09-28 16:02:16 -07:00
2018-02-06 18:05:34 +01:00
2018-02-01 23:19:41 -08:00
2018-01-25 11:35:34 -05:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-28 13:21:25 +01:00
2018-01-24 13:07:05 +01:00
2018-02-08 22:06:43 +01:00
2018-02-08 22:06:43 +01:00
2018-02-11 10:48:15 +01:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-07 20:44:21 +00:00
2018-02-13 10:58:41 +01:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-12 11:22:54 +00:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-02-07 16:15:28 -05:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2017-11-16 08:23:01 +13:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-11 21:40:51 +01:00
2018-01-03 02:26:56 +09:00
2018-02-08 09:21:49 +01:00
2018-01-03 02:26:56 +09:00
2018-02-12 10:34:49 +01:00
2018-01-25 11:35:34 -05:00
2018-02-05 02:25:28 -08:00
2018-01-23 13:16:56 -05:00
2018-01-10 20:55:41 -10:00
2018-01-10 20:55:41 -10:00
2018-01-03 02:26:56 +09:00
2018-01-11 14:13:24 -05:00
2017-10-04 14:54:41 +02:00
2017-11-17 14:04:02 +01:00
2017-12-23 11:22:18 +01:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-13 15:57:30 -05:00
2018-01-13 15:57:30 -05:00
2018-02-08 18:06:21 -05:00
2018-01-24 12:18:29 +01:00
2018-02-08 14:35:28 -05:00
2018-02-08 14:35:28 -05:00
2018-02-07 16:15:28 -05:00
2018-01-03 02:26:56 +09:00
2018-02-07 16:15:28 -05:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-02-07 16:15:28 -05:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-02-10 10:05:07 -05:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-28 13:21:25 +01:00
2018-01-28 13:21:25 +01:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2017-10-29 21:12:12 +08:00
2018-02-08 14:35:29 -05:00
2018-02-08 14:35:29 -05:00
2018-01-03 02:26:56 +09:00
2018-02-07 16:15:28 -05:00
2018-01-09 08:59:21 -05:00
2018-01-25 18:02:24 -05:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-02-15 16:24:45 +01:00
2018-02-05 17:48:59 -05:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-02-12 10:34:49 +01:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00
2018-01-03 02:26:56 +09:00