mirror of
https://github.com/fluencelabs/redis
synced 2025-06-17 11:11:20 +00:00
enable backtrace capabilities only for Linux and MacOSX
This commit is contained in:
7
redis.c
7
redis.c
@ -4108,6 +4108,7 @@ static void debugCommand(redisClient *c) {
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(__APPLE__) || defined(__linux__)
|
||||
static struct redisFunctionSym symsTable[] = {
|
||||
{"freeStringObject", (unsigned long)freeStringObject},
|
||||
{"freeListObject", (unsigned long)freeListObject},
|
||||
@ -4288,6 +4289,7 @@ static void segvHandler(int sig, siginfo_t *info, void *secret) {
|
||||
}
|
||||
|
||||
static void setupSigSegvAction(void) {
|
||||
#if defined(__APPLE__) || defined(__linux__)
|
||||
struct sigaction act;
|
||||
|
||||
sigemptyset (&act.sa_mask);
|
||||
@ -4297,8 +4299,13 @@ static void setupSigSegvAction(void) {
|
||||
act.sa_sigaction = segvHandler;
|
||||
sigaction (SIGSEGV, &act, NULL);
|
||||
sigaction (SIGBUS, &act, NULL);
|
||||
#else
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* if __APPLE__ or __linux__ */
|
||||
|
||||
/* =================================== Main! ================================ */
|
||||
|
||||
#ifdef __linux__
|
||||
|
Reference in New Issue
Block a user