📄 sighandler.h
字号:
#ifndef Sighandler_h#define Sighandler_h#include "signal.h"class sigint_handler{public: explicit sigint_handler (void (*p)(int)) { new_.sa_handler = p; sigemptyset(&new_.sa_mask); new_.sa_flags = 0; sigaction (SIGINT, &new_, &old_); if (old_.sa_handler != SIG_IGN) sigaction (SIGINT, &new_, NULL); } private: struct sigaction new_,old_;};#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -