lockfile.h
Go to the documentation of this file.
#ifndef WIBBLE_SYS_LOCKFILE_H
#define WIBBLE_SYS_LOCKFILE_H
#include <wibble/sys/macros.h>
#include <string>
namespace wibble {
namespace sys {
namespace fs {
struct Lockfile
{
std::string name;
int fd;
Lockfile(const std::string& name, bool write = true);
~Lockfile();
private:
// Disallow copying
Lockfile(const Lockfile&);
Lockfile& operator=(const Lockfile&);
};
}
}
}
// vim:set ts=4 sw=4:
#endif
macros.h
wibble
Definition: amorph.h:17
wibble::sys::fs::Lockfile
RAII lock file.
Definition: lockfile.h:18
wibble::sys::fs::Lockfile::fd
int fd
Definition: lockfile.h:20
wibble::sys::fs::Lockfile::name
std::string name
Definition: lockfile.h:19
wibble::sys::fs::Lockfile::~Lockfile
~Lockfile()
wibble::sys::fs::Lockfile::Lockfile
Lockfile(const std::string &name, bool write=true)
Create the lockfile with the given name.