提交 5e007a8e 编写于 作者: S slguan

[TBASE-1230]

上级 960aae4f
......@@ -224,6 +224,7 @@ int64_t str2int64(char *str);
void taosSetCoreDump();
void taosBlockSIGPIPE();
#define BUILDIN_CLZL(val) __builtin_clzl(val)
#define BUILDIN_CLZ(val) __builtin_clz(val)
......
......@@ -341,3 +341,13 @@ bool taosSkipSocketCheck() {
return false;
}
void taosBlockSIGPIPE() {
sigset_t signal_mask;
sigemptyset(&signal_mask);
sigaddset(&signal_mask, SIGPIPE);
int rc = pthread_sigmask(SIG_BLOCK, &signal_mask, NULL);
if (rc != 0) {
pError("failed to block SIGPIPE");
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册