#pragma once #include "types.hh" namespace nix { /* Open (possibly create) a lock file and return the file descriptor. -1 is returned if create is false and the lock could not be opened because it doesn't exist. Any other error throws an exception. */ int openLockFile(const Path & path, bool create); /* Delete an open lock file. */ void deleteLockFile(const Path & path, int fd); enum LockType { ltRead, ltWrite, ltNone }; bool lockFile(int fd, LockType lockType, bool wait); class PathLocks { private: typedef std::pair FDPair; list fds; bool deletePaths; public: PathLocks(); PathLocks(const PathSet & paths, const string & waitMsg = ""); bool lockPaths(const PathSet & _paths, const string & waitMsg = "", bool wait = true); ~PathLocks(); void unlock(); void setDeletion(bool deletePaths); }; bool pathIsLockedByMe(const Path & path); } b'>Wojtek's customized Guix
aboutsummaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2019-05-13doc: Add Russian translation....Ludovic Courtès
2019-05-04doc: Warn about missing entries in htmlxref.cnf....Ludovic Courtès
2019-04-24doc: Add Simplified Chinese translation....Ludovic Courtès
2019-04-23doc: Add Spanish translation....Miguel Ángel Arruga Vivas
2019-03-13doc: Document the graphical installer some more....Ludovic Courtès
2018-11-01doc: Add German translation....Julien Lepiller
2018-04-29build: Use only one domain for guix-manual....Julien Lepiller
2018-04-25build: Add silent rules for Texinfo xref translation....Ludovic Courtès
2018-04-19gnu: doc: Add French documentation....Julien Lepiller
2018-04-19gnu: doc: Allow documentation to be translated....Julien Lepiller
2018-01-20build: Declare “doc/guix.texi“ dependencies....Mathieu Lirzin
2017-01-12build: Remove reference to 'doc/emacs.texi'....Ludovic Courtès
2016-05-24build: Use "%D%" in Makefile fragments....Mathieu Lirzin
2016-04-21build: Move 'Makefile' fragments to subdirectories....Mathieu Lirzin