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:
write If false, use a read lock, else a write lock.

References fd.

wibble::sys::fs::Lockfile::~Lockfile (  ) 

References fd.


Member Data Documentation

Referenced by Lockfile(), and ~Lockfile().


The documentation for this struct was generated from the following files:
Generated on Wed May 12 10:42:04 2010 for wibble by  doxygen 1.6.3