#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); } ect> Wojtek's customized Guix
aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-05-19Update name for Kei Kebreau.Kei Kebreau
* .mailmap: Add Kei Kebreau. * gnu/local.mk: Replace "Kei Yamashita" with "Kei Kebreau". * gnu/packages/calendar.scm: Likewise. * gnu/packages/dillo.scm: Likewise. * gnu/packages/fltk.scm: Likewise. * gnu/packages/game-development.scm: Likewise. * gnu/packages/games.scm: Likewise. * gnu/packages/gnome.scm: Likewise. * gnu/packages/gtk.scm: Likewise. * gnu/packages/music.scm: Likewise. * gnu/packages/xfce.scm: Likewise. Signed-off-by: Alex Kost <alezost@gmail.com>
2016-04-18gnu: Add dillo.Kei Yamashita
* gnu/packages/dillo.scm: New file. * gnu-system.am (GNU_SYSTEM_MODULES): Add it. Signed-off-by: Leo Famulari <leo@famulari.name>