📄 lockfile.h
字号:
//// Locking files//#ifndef _MY_LOCKF_H_#define _MY_LOCKF_H_#include <string>extern "C" {# include <stdio.h># include <fcntl.h># include <termios.h># include <unistd.h># include <sys/syslog.h># include <sys/types.h># include <sys/stat.h>};#define LOCK_DIR "/var/lock"class LockFile {private: bool isLocked; string name;public: LockFile(); ~LockFile(); bool Lock(const char *fname); bool Lock(string fname) { Lock(fname.c_str()); } void UnLock();};#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -