enable backtrace capabilities only for Linux and MacOSX

This commit is contained in:
antirez
2009-06-07 15:47:59 +02:00
parent 56906eefea
commit e65fdc7838
2 changed files with 17 additions and 0 deletions

View File

@ -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__