wibble  0.1.28
Public Member Functions | Public Attributes
wibble::sys::fs::Lockfile Struct Reference

RAII lock file. More...

#include <lockfile.h>

List of all members.

Public Member Functions

 Lockfile (const std::string &name, bool write=true)
 Create the lockfile with the given name.
 ~Lockfile ()

Public Attributes

std::string name
int fd

Detailed Description

RAII lock file.

It is implemented using fcntl, so that it should also work over network file systems. It should work at least on NFS and GFS.


Constructor & Destructor Documentation

wibble::sys::fs::Lockfile::Lockfile ( const std::string &  name,
bool  write = true 
)

Create the lockfile with the given name.

Parameters:
writeIf false, use a read lock, else a write lock.
wibble::sys::fs::Lockfile::~Lockfile ( )

Member Data Documentation

int wibble::sys::fs::Lockfile::fd
std::string wibble::sys::fs::Lockfile::name

The documentation for this struct was generated from the following file: