#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); } sub'>Wojtek's customized Guix
aboutsummaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2024-01-08scripts: system: Build layered images....Oleg Pykhalov
2022-09-24system: image: Add wsl2 support....Alex Griffin
2022-09-24system: image: Add tarball support....Alex Griffin
2022-09-24image: Make the operating-system field mandatory....Mathieu Othacehe
2022-09-07image: Use #true and #false....Mathieu Othacehe
2022-09-07image: Use a default size partition value....Mathieu Othacehe
2022-08-31image: Add comments....Mathieu Othacehe
2022-08-30image: Remove an unused field....Mathieu Othacehe
2022-08-30image: Perform more sanitizing....Mathieu Othacehe
2022-07-01image: Add sanitizers for 'format' and 'partition-table-type'....Ludovic Courtès
2022-07-01image: Add default value for partition initializer....Ludovic Courtès
2022-05-25Move (gnu platform) and (gnu platforms ...) to guix/....Josselin Poiret
2021-12-23image: Add a shared-network? field....Mathieu Othacehe
2021-12-23image: Add a shared-store? field....Mathieu Othacehe
2021-11-12image: Support generating GPT images via `partition-table-type`....Ryan Sundberg
2021-10-11gnu: Add platform support....Mathieu Othacehe