1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-27 12:41:00 +01:00

* Cygwin compatibility (Cygwin can't upgrade read locks to write

locks, it deadlocks when you try to do that).
This commit is contained in:
Eelco Dolstra 2008-04-10 06:53:16 +00:00
parent a599708b7a
commit f83f764218
2 changed files with 6 additions and 2 deletions

View file

@ -22,6 +22,11 @@ void LocalStore::upgradeStore12()
{
#if OLD_DB_COMPAT
#ifdef __CYGWIN__
/* Cygwin can't upgrade a read lock to a write lock... */
lockFile(globalLock, ltNone, true);
#endif
if (!lockFile(globalLock, ltWrite, false)) {
printMsg(lvlError, "waiting for exclusive access to the Nix store...");
lockFile(globalLock, ltWrite, true);