#include "file-descriptor.hh"
Go to the source code of this file.
Classes | |
class | nix::PathLocks |
struct | nix::FdLock |
Enumerations | |
enum | LockType { ltRead , ltWrite , ltNone } |
Functions | |
AutoCloseFD | nix::openLockFile (const Path &path, bool create) |
void | nix::deleteLockFile (const Path &path, Descriptor desc) |
bool | nix::lockFile (Descriptor desc, LockType lockType, bool wait) |
void nix::deleteLockFile | ( | const Path & | path, |
Descriptor | desc ) |
Delete an open lock file.
AutoCloseFD nix::openLockFile | ( | const Path & | path, |
bool | create ) |
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.