YSTest: csignal.h 源文件

YSTest PreAlpha_b900_20201012 The YSLib Test Project

csignal.h
浏览该文件的文档.
1 /*
2 © 2015 FrankHB.
3
4 This file is part of the YSLib project, and may only be used,
5 modified, and distributed under the terms of the YSLib project
6 license, LICENSE.TXT. By continuing to use, modify, or distribute
7 this file you indicate that you have read the license and
8 understand and accept it fully.
9 */
10
28 #ifndef YB_INC_ystdex_csignal_h_
29 #define YB_INC_ystdex_csignal_h_ 1
30
31 #include "../ydef.h"
32 #include <csignal>
33
34 namespace ystdex
35 {
36
38
39 inline void
41 restore_signal(int sig) ynothrow
42 {
43 std::signal(sig, SIG_DFL);
44 }
45
52 YB_API void
53 reraise(int sig) ynothrow;
55
56 } // namespace ystdex;
57
58 #endif
59
ystdex::restore_signal
void restore_signal(int sig)
调用 signal 重置默认信号处理器。
Definition: csignal.h:41
YB_API
#define YB_API
YBase 应用程序编程接口：用于向库文件约定链接。
Definition: ydef.h:985
ystdex
<memory> 特性测试宏。
Definition: ydef.h:1262
ystdex::reraise
void reraise(int sig)
调用 restore_signal 重置默认信号处理器后调用 raise 引发信号。
Definition: csignal.cpp:34
ynothrow
#define ynothrow
YSLib 无异常抛出保证：若支持 noexcept 关键字， 指定特定的 noexcept 异常规范。
Definition: ydef.h:1199