17 : _do_lock(do_lock), _fd(-1), _filename(filename)
23 _fd = open(filename.c_str(), O_RDWR | O_CREAT, 0666);
26 if (flock(
_fd, LOCK_EX) != 0)
37 if (flock(
_fd, LOCK_UN) != 0)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
void mooseWarning(Args &&... args)
Emit a warning message with the given stringified, concatenated args.
const std::string _filename
LockFile(const std::string &filename, bool do_lock=true)