#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
2019-10-21services: sddm: Add description....Ludovic Courtès
2019-10-21services: sddm: Deprecate 'sddm-service' procedure....Ludovic Courtès
2019-10-21services: sddm: Add default configuration....Brendan Tildesley
2019-05-26services: sddm: Fix root login failure issue....Reza Alizadeh Majd
2019-04-11services: sddm: Switch back to using ‘startx’....frozenpigs
2019-03-25services: SDDM: Specify absolute path to the X server....Marius Bakke
2019-03-24services: sddm, slim, gdm: Take an <xorg-configuration> record....Ludovic Courtès
2016-12-21gnu: Fix typo in comment....John Darrington
2016-10-15gnu: services sddm Fix typo....John Darrington
2016-09-10system: Use 'file-append' to denote file names....Ludovic Courtès
2016-09-06services: Add sddm service....David Craven