#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); } Wojtek's customized Guix
aboutsummaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2018-07-22gnu: pcre: Update to 8.42....Marius Bakke
2018-07-19gnu: pcre: Install static libraries to separate output....Marius Bakke
2018-02-28gnu: pcre2: Update to 10.31....Tobias Geerinckx-Rice
2018-01-19Merge branch 'master' into core-updatesMark H Weaver
2018-01-13gnu: pcre: Use HTTPS for home pages....Tobias Geerinckx-Rice
2017-10-01gnu: pcre: Update to 8.41....Efraim Flashner
2017-07-23Merge branch 'master' into core-updatesLeo Famulari
2017-07-20gnu: pcre: Update replacement to 8.41 [fixes CVE-2017-{7244,7245,7246}]....Leo Famulari
2017-07-03packages: Mark 'replacement' as an "innate" field....Ludovic Courtès
2017-05-24Merge branch 'master' into core-updatesRicardo Wurmus
2017-05-07gnu: pcre2: Fix build configuration for pcre2....Leo Famulari
2017-05-07gnu: pcre2: Fix CVE-2017-8786....Leo Famulari
2017-04-10gnu: pcre: Patch CVE-2017-7186....Ludovic Courtès
2017-04-10gnu: pcre2: Patch CVE-2017-7186....Ludovic Courtès