2 #ifndef ZYPP_BASE_INTER_PROCESS_MUTEX_H
3 #define ZYPP_BASE_INTER_PROCESS_MUTEX_H
20 const std::string &
name,
78 const std::string &pname =
"zypp",
options to alter the mutex behavor
Options(ConsumerType ptype, const std::string &pname="zypp", int ptimeout=-1)
Options for a mutex of type ptype with a given name and timeout.
~InterProcessMutex()
Destructor, gives up the lock on the named resource.
boost::noncopyable NonCopyable
Ensure derived classes cannot be copied.
Inter process scoped lock implementation.
ZYppLockedException(const std::string &msg_r, const std::string &name, pid_t locker_pid)
bool isProcessRunning(pid_t pid_r)
ConsumerType
Processes can be of two types Reader or Writer.
void setPath(const Pathname &base)
set the path where the lockfile is created.
Base class for Exception.
virtual ~ZYppLockedException()
InterProcessMutex(const Options &poptions)
Creates a mutex with a name and a timeout.
Pathname lockFilePath() const