fix: windows compile issue
This commit is contained in:
parent
8ff3b2fda3
commit
586b73bef1
|
@ -394,7 +394,9 @@ void taosClientCrash(int signum, void *sigInfo, void *context) {
|
|||
taosIgnSignal(SIGINT);
|
||||
taosIgnSignal(SIGBREAK);
|
||||
|
||||
#if !defined(WINDOWS)
|
||||
taosIgnSignal(SIGBUS);
|
||||
#endif
|
||||
taosIgnSignal(SIGABRT);
|
||||
taosIgnSignal(SIGFPE);
|
||||
taosIgnSignal(SIGSEGV);
|
||||
|
@ -504,7 +506,9 @@ void tscStopCrashReport() {
|
|||
}
|
||||
|
||||
static void tscSetSignalHandle() {
|
||||
#if !defined(WINDOWS)
|
||||
taosSetSignal(SIGBUS, taosClientCrash);
|
||||
#endif
|
||||
taosSetSignal(SIGABRT, taosClientCrash);
|
||||
taosSetSignal(SIGFPE, taosClientCrash);
|
||||
taosSetSignal(SIGSEGV, taosClientCrash);
|
||||
|
|
|
@ -74,7 +74,9 @@ void dmLogCrash(int signum, void *sigInfo, void *context) {
|
|||
taosIgnSignal(SIGINT);
|
||||
taosIgnSignal(SIGBREAK);
|
||||
|
||||
#ifndef WINDOWS
|
||||
taosIgnSignal(SIGBUS);
|
||||
#endif
|
||||
taosIgnSignal(SIGABRT);
|
||||
taosIgnSignal(SIGFPE);
|
||||
taosIgnSignal(SIGSEGV);
|
||||
|
@ -111,7 +113,9 @@ static void dmSetSignalHandle() {
|
|||
taosSetSignal(SIGQUIT, dmStopDnode);
|
||||
#endif
|
||||
|
||||
#ifndef WINDOWS
|
||||
taosSetSignal(SIGBUS, dmLogCrash);
|
||||
#endif
|
||||
taosSetSignal(SIGABRT, dmLogCrash);
|
||||
taosSetSignal(SIGFPE, dmLogCrash);
|
||||
taosSetSignal(SIGSEGV, dmLogCrash);
|
||||
|
|
|
@ -899,7 +899,7 @@ void taosLogCrashInfo(char* nodeType, char* pMsg, int64_t msgLen, int signum, vo
|
|||
int64_t writeSize = taosWriteFile(pFile, &msgLen, sizeof(msgLen));
|
||||
if (sizeof(msgLen) != writeSize) {
|
||||
taosUnLockFile(pFile);
|
||||
taosPrintLog(flags, level, dflag, "failed to write len to file:%s,%p wlen:%" PRId64 " tlen:%" PRId64 " since %s",
|
||||
taosPrintLog(flags, level, dflag, "failed to write len to file:%s,%p wlen:%" PRId64 " tlen:%lu since %s",
|
||||
filepath, pFile, writeSize, sizeof(msgLen), terrstr());
|
||||
goto _return;
|
||||
}
|
||||
|
@ -977,7 +977,7 @@ void taosReadCrashInfo(char* filepath, char** pMsg, int64_t* pMsgLen, TdFilePtr*
|
|||
if (sizeof(msgLen) != readSize) {
|
||||
truncateFile = true;
|
||||
if (readSize < 0) {
|
||||
taosPrintLog(flags, level, dflag, "failed to read len from file:%s,%p wlen:%" PRId64 " tlen:%" PRId64 " since %s",
|
||||
taosPrintLog(flags, level, dflag, "failed to read len from file:%s,%p wlen:%" PRId64 " tlen:%lu since %s",
|
||||
filepath, pFile, readSize, sizeof(msgLen), terrstr());
|
||||
}
|
||||
goto _return;
|
||||
|
|
Loading…
Reference in New Issue